lib, bgpd, tests: Refactor FILTER_X in zebra.h

lib/zebra.h has FILTER_X #define's.  These do not belong there.
Put them in lib/filter.h where they belong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 0490729cc033a3483fc6b0ed45085ee249cac779)
This commit is contained in:
Donald Sharp 2016-01-07 10:03:01 -05:00 committed by Donald Sharp
parent 6bcd6029f1
commit 039f3a3495
33 changed files with 38 additions and 13 deletions

View File

@ -26,6 +26,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "hash.h"
#include "thread.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"

View File

@ -30,6 +30,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "stream.h"
#include "jhash.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_aspath.h"

View File

@ -31,6 +31,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "jhash.h"
#include "queue.h"
#include "table.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_attr.h"

View File

@ -34,6 +34,8 @@
#include "vty.h"
#include "bfd.h"
#include "lib/json.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgp_fsm.h"
#include "bgpd/bgp_bfd.h"

View File

@ -27,6 +27,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "command.h"
#include "memory.h"
#include "privs.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_dump.h"

View File

@ -24,6 +24,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "prefix.h"
#include "memory.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_community.h"

View File

@ -27,6 +27,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "log.h"
#include "thread.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_damp.h"

View File

@ -30,6 +30,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "sockunion.h"
#include "memory.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_aspath.h"

View File

@ -29,9 +29,9 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "linklist.h"
#include "queue.h"
#include "memory.h"
#include "filter.h"
#include "bgpd/bgp_table.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_route.h"
#include "bgpd/bgp_attr.h"

View File

@ -25,6 +25,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "prefix.h"
#include "command.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_ecommunity.h"

View File

@ -25,6 +25,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "memory.h"
#include "buffer.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_aspath.h"
@ -66,18 +67,12 @@ struct as_filter
char *reg_str;
};
enum as_list_type
{
ACCESS_TYPE_STRING,
ACCESS_TYPE_NUMBER
};
/* AS path filter list. */
struct as_list
{
char *name;
enum as_list_type type;
enum access_type type;
struct as_list *next;
struct as_list *prev;

View File

@ -32,6 +32,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "plist.h"
#include "workqueue.h"
#include "queue.h"
#include "filter.h"
#include "lib/json.h"
#include "bgpd/bgpd.h"

View File

@ -29,6 +29,7 @@
#include "sockunion.h"
#include "memory.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"

View File

@ -26,6 +26,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "memory.h"
#include "stream.h"
#include "queue.h"
#include "filter.h"
#include "lib/json.h"
#include "bgpd/bgpd.h"

View File

@ -33,6 +33,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "network.h"
#include "queue.h"
#include "hash.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_open.h"

View File

@ -32,6 +32,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "jhash.h"
#include "nexthop.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"

View File

@ -31,6 +31,7 @@
#include "memory.h"
#include "nexthop.h"
#include "vrf.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"

View File

@ -28,6 +28,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "command.h"
#include "memory.h"
#include "queue.h"
#include "filter.h"
#include "lib/json.h"
#include "bgpd/bgpd.h"

View File

@ -32,6 +32,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "linklist.h"
#include "plist.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"

View File

@ -24,6 +24,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "command.h"
#include "memory.h"
#include "queue.h"
#include "filter.h"
#include "bgpd.h"
#include "bgp_aspath.h"

View File

@ -30,6 +30,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "command.h"
#include "thread.h"
#include "smux.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"

View File

@ -25,6 +25,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "sockunion.h"
#include "vty.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"

View File

@ -36,6 +36,7 @@
#include "thread.h"
#include "queue.h"
#include "routemap.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"

View File

@ -32,6 +32,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "memory.h"
#include "hash.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_advertise.h"

View File

@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. */
#include "memory.h"
#include "lib/json.h"
#include "lib/bfd.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_route.h"

View File

@ -25,6 +25,11 @@
#include "if.h"
/* Filter direction. */
#define FILTER_IN 0
#define FILTER_OUT 1
#define FILTER_MAX 2
/* Filter type is made by `permit', `deny' and `dynamic'. */
enum filter_type
{

View File

@ -522,11 +522,6 @@ typedef enum {
#define SAFI_ENCAP 7 /* per IANA */
#define SAFI_MAX 8
/* Filter direction. */
#define FILTER_IN 0
#define FILTER_OUT 1
#define FILTER_MAX 2
/* Default Administrative Distance of each protocol. */
#define ZEBRA_KERNEL_DISTANCE_DEFAULT 0
#define ZEBRA_CONNECT_DISTANCE_DEFAULT 0

View File

@ -25,6 +25,7 @@
#include "stream.h"
#include "privs.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_aspath.h"

View File

@ -26,6 +26,7 @@
#include "privs.h"
#include "memory.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_open.h"

View File

@ -26,6 +26,7 @@
#include "privs.h"
#include "memory.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_attr.h"

View File

@ -30,6 +30,7 @@
#include "memory.h"
#include "zclient.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"

View File

@ -25,6 +25,7 @@
#include "privs.h"
#include "memory.h"
#include "queue.h"
#include "filter.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_ecommunity.h"

View File

@ -37,6 +37,7 @@
#include "linklist.h"
#include "command.h"
#include "memory.h"
#include "filter.h"
#include "vtysh/vtysh.h"
#include "log.h"
#include "bgpd/bgp_vty.h"