]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib, bgpd, tests: Refactor FILTER_X in zebra.h
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 7 Jan 2016 15:03:01 +0000 (10:03 -0500)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Tue, 16 Aug 2016 15:00:22 +0000 (11:00 -0400)
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)

33 files changed:
bgpd/bgp_advertise.c
bgpd/bgp_aspath.c
bgpd/bgp_attr.c
bgpd/bgp_bfd.c
bgpd/bgp_btoa.c
bgpd/bgp_clist.c
bgpd/bgp_damp.c
bgpd/bgp_debug.c
bgpd/bgp_dump.c
bgpd/bgp_ecommunity.c
bgpd/bgp_filter.c
bgpd/bgp_fsm.c
bgpd/bgp_mpath.c
bgpd/bgp_mplsvpn.c
bgpd/bgp_network.c
bgpd/bgp_nexthop.c
bgpd/bgp_nht.c
bgpd/bgp_open.c
bgpd/bgp_packet.c
bgpd/bgp_regex.c
bgpd/bgp_snmp.c
bgpd/bgp_table.c
bgpd/bgp_updgrp_adv.c
bgpd/bgp_vty.c
bgpd/bgp_zebra.c
lib/filter.h
lib/zebra.h
tests/aspath_test.c
tests/bgp_capability_test.c
tests/bgp_mp_attr_test.c
tests/bgp_mpath_test.c
tests/ecommunity_test.c
vtysh/vtysh.c

index de27513a4275d0217f9a44d4e5bcd9918588d374..da5ab94e977ea02337c5d6375e06a27e8e1a9d7a 100644 (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"
index 4161d149fae3cdf08ed70842985e2e8d5fcc71d6..eca4441010df558f684056ce6b66e60b145da3f8 100644 (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"
index eefdd9e8ecba1195fe62d956a38fb516e38d10c2..dc157ba7d022c6828be41e1da907c7ac74246459 100644 (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"
index b8b005369529e4f62f29c2c70d37f3554394ea73..b0c812cca953c006587aae9084d86cf3036d68dd 100644 (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"
index a6c16d8c2de0a879aa833b537aa63a9d37e81499..904ae66e109a5c6ee4ad0a910f7b5aeec8deac17 100644 (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"
index 4beae4391e52479a3b27c36cd8a69ebb1be47a9f..12c936b190a5499730e8e37e5c9b5e5d7cb1b324 100644 (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"
index 2e2dc42ad12c44cd1a7fa4289e513468ef9c0728..f4a83d720b735982234e631a2adf88f94be0eea5 100644 (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"
index 5b6ee0e070bb337886828f5932bc2aab847a758c..7427afed7bd1cf44161d562915a58bed1dbd9312 100644 (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"
index 59bb2f8a13ac5386f260187df38ea309b4376b37..e219d5248ebbe706a929b5130f995af6832b4314 100644 (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"
index dc0137fd19e146689c4536ebee96a44f5e2555f2..e55ce3528c1c5653848219b0bba6411ac2e51010 100644 (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"
index 693c639f750f40c3b1ea62a4724259153d793aff..33877e72587f411f1335f904f67f3c3cb5ca2b1a 100644 (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;
index 9da21fdffda984cd66138db6c0235a5d46f885a8..ae77ac421a3c7ca4ebd1355ca7df81570131e26a 100644 (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"
index 8397177f8fd2960ee3c8ac1a31f05967cd601fb3..9d742204f6e1a52218c350764b14ad9ea45223c6 100644 (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"
index 00f8221bcbc9c73f77daeba6f886d525cdbed0e1..4650495fafc1fbb8388a7e895ada64a0894ec1a8 100644 (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"
index bafc666a192be8a2b86fabc420723c7eeccd0246..0caada488b1554f92f5e1682d96bb8ac5ad05a04 100644 (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"
index 80495065b0db45aba5910daa9c19f37cd2dac96a..d96224c0936981d130e7454767f9fed0241ba9e4 100644 (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"
index 9d8d8f3b527ce0dafeb450e268f461804a0e7782..42885165c721eaea7372ed3b5ec7ef50e7a57063 100644 (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"
index 87654888810cd50d357b36724f6118af7837d8bd..915757e622f55dc15b52972d742adb4fe4bfa144 100644 (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"
index 0236f6777a2ac4afe6f193948e00b19fa4987230..937623a30b2515a26d25c0c03e42377506a314a6 100644 (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"
index 15c23c9ff9655b946987662d44e3c6ac8e9a9855..ea87633dc0650119fe29c7b342d873501ee1ff12 100644 (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"
index fc5a0eb59c6673b4304f2c4ab64ad53cd4157a5a..5e6218e8a34eb6a13e7014f4d866b6bfa0491f43 100644 (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"
index 1df24859f5c10de44b9049ac75087e525681c762..114c6ef013510abea7cc2c157bd021540e9bf0ad 100644 (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"
index 4b684be1bb178b4399bbb490569bcf288a5211d0..96bcd011ca48f18c86c9aabdb8387180f0ce55b2 100644 (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"
index 9df92fea03fff0ee014e11cc6736f87ea9cff4b1..4b1174b16db636d70bba3cd3c283cfc5e6df9e3e 100644 (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"
index 874d80bd8e66aa33b9c0b2e5e9f292f7fbd5fba3..ce5d1b498ed9e81485b388e24a7de8be3ac3e30e 100644 (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"
index 37535cb13baaf7cd62408480c10ba0349cf2678b..e6ccd33b3a33ad0c6251751a8b8a003631e8b685 100644 (file)
 
 #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 
 {
index 59c154ba46b2f4b2e3e194b8e9d794dd85f290e0..b3a814c0d2b69f45ac0c9146f98e604cf735a43c 100644 (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
index fde12c41c4b47eeded81cc1b1f1accb481c2b342..9d595807fee480de285edf289c764e7f273b958b 100644 (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"
index ecabc2f19f26c1d922a4bd986648d0b7ab522af2..73f46b59a04a6e6995e5a2e8738b61df1b092945 100644 (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"
index ba619916d454677c31b2a5ea1528bbb8d93da7f8..928d69752a705eb13814da3a68d0d32067d2629b 100644 (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"
index bafbef75fbcac2b048c5e9588b6aa5dd881c6921..66a718cbe2e952261ccf9957ec5044c13267a8f2 100644 (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"
index 1d4f6a18609dfc97f9a1bb44fca178fb763586ba..9166af61421fbceb07ffe2fd80d76aa683c11c85 100644 (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"
index ad43f41fd9d3b31b929e3b21cc6453f1c7c0c405..80ee0acc3e58ab4bdbf0a7c4c51658368b3f7e8f 100644 (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"