mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
*: Remove netlink headers from lib/zebra.h
The headers associated with netlink code really only belong in those that need it. Move these headers out of lib/zebra.h and into more appropriate places. bgp's usage of the RT_TABLE_XXX defines are probably not appropriate and will be cleaned up in future commits. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
f57763eaed
commit
315aa6cde4
|
@ -13,6 +13,10 @@
|
||||||
|
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX
|
||||||
|
#include <linux/filter.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BFD_LINUX
|
#ifdef BFD_LINUX
|
||||||
#include <linux/if_packet.h>
|
#include <linux/if_packet.h>
|
||||||
#endif /* BFD_LINUX */
|
#endif /* BFD_LINUX */
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
|
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX
|
||||||
|
#include <linux/rtnetlink.h> //RT_TABLE_XXX
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "lib/json.h"
|
#include "lib/json.h"
|
||||||
#include "lib/sockopt.h"
|
#include "lib/sockopt.h"
|
||||||
|
|
|
@ -115,11 +115,7 @@
|
||||||
|
|
||||||
#include <net/route.h>
|
#include <net/route.h>
|
||||||
|
|
||||||
#ifdef HAVE_NETLINK
|
#ifndef HAVE_NETLINK
|
||||||
#include <linux/netlink.h>
|
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
#include <linux/filter.h>
|
|
||||||
#else
|
|
||||||
#define RT_TABLE_MAIN 0
|
#define RT_TABLE_MAIN 0
|
||||||
#define RT_TABLE_LOCAL RT_TABLE_MAIN
|
#define RT_TABLE_LOCAL RT_TABLE_MAIN
|
||||||
#endif /* HAVE_NETLINK */
|
#endif /* HAVE_NETLINK */
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <netinet/if_ether.h>
|
#include <netinet/if_ether.h>
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <net/ethernet.h>
|
#include <net/ethernet.h>
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "lib/zebra.h"
|
#include "lib/zebra.h"
|
||||||
|
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
|
||||||
#include "lib/json.h"
|
#include "lib/json.h"
|
||||||
#include "lib/libfrr.h"
|
#include "lib/libfrr.h"
|
||||||
#include "lib/frratomic.h"
|
#include "lib/frratomic.h"
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
#define _LINUX_IF_H
|
#define _LINUX_IF_H
|
||||||
#define _LINUX_IP_H
|
#define _LINUX_IP_H
|
||||||
|
|
||||||
|
#include <linux/netlink.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
#include <netinet/if_ether.h>
|
#include <netinet/if_ether.h>
|
||||||
#include <linux/if_bridge.h>
|
#include <linux/if_bridge.h>
|
||||||
#include <linux/if_link.h>
|
#include <linux/if_link.h>
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
#ifdef HAVE_NETLINK
|
#ifdef HAVE_NETLINK
|
||||||
|
#include <linux/netlink.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#include <linux/filter.h>
|
||||||
|
|
||||||
#include "linklist.h"
|
#include "linklist.h"
|
||||||
#include "if.h"
|
#include "if.h"
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
|
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <lib/version.h>
|
#include <lib/version.h>
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
#include <ns.h>
|
#include <ns.h>
|
||||||
|
|
||||||
|
#include <linux/netlink.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
#include "linux/netconf.h"
|
#include "linux/netconf.h"
|
||||||
|
|
||||||
#include "lib/lib_errors.h"
|
#include "lib/lib_errors.h"
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
|
|
||||||
#ifdef HAVE_NETLINK
|
#ifdef HAVE_NETLINK
|
||||||
|
|
||||||
|
#include <linux/netlink.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
|
||||||
#include "if.h"
|
#include "if.h"
|
||||||
#include "prefix.h"
|
#include "prefix.h"
|
||||||
#include "vrf.h"
|
#include "vrf.h"
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#ifdef HAVE_NETLINK
|
#ifdef HAVE_NETLINK
|
||||||
|
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
#include <linux/pkt_cls.h>
|
#include <linux/pkt_cls.h>
|
||||||
#include <linux/pkt_sched.h>
|
#include <linux/pkt_sched.h>
|
||||||
#include <netinet/if_ether.h>
|
#include <netinet/if_ether.h>
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
|
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX
|
||||||
|
#include <linux/neighbour.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "interface.h"
|
#include "interface.h"
|
||||||
#include "jhash.h"
|
#include "jhash.h"
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
|
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "libfrr.h"
|
#include "libfrr.h"
|
||||||
#include "stream.h"
|
#include "stream.h"
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#endif
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "vrf.h"
|
#include "vrf.h"
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
|
|
||||||
#ifdef HAVE_NETLINK
|
#ifdef HAVE_NETLINK
|
||||||
|
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#include <linux/neighbour.h>
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "rib.h"
|
#include "rib.h"
|
||||||
#include "vty.h"
|
#include "vty.h"
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
#ifdef HAVE_NETLINK
|
#ifdef HAVE_NETLINK
|
||||||
|
|
||||||
|
#include <linux/netlink.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
|
||||||
#include "zebra/debug.h"
|
#include "zebra/debug.h"
|
||||||
#include "zebra/rt.h"
|
#include "zebra/rt.h"
|
||||||
#include "zebra/rt_netlink.h"
|
#include "zebra/rt_netlink.h"
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
|
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX
|
||||||
|
#include <linux/if_link.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "vrf.h"
|
#include "vrf.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -18,6 +18,8 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_NETLINK
|
#ifdef HAVE_NETLINK
|
||||||
|
#include <linux/netlink.h>
|
||||||
|
|
||||||
/* Socket interface to kernel */
|
/* Socket interface to kernel */
|
||||||
struct nlsock {
|
struct nlsock {
|
||||||
int sock;
|
int sock;
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
|
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "if.h"
|
#include "if.h"
|
||||||
#include "linklist.h"
|
#include "linklist.h"
|
||||||
|
|
Loading…
Reference in a new issue