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 <sha...@cumulusnetworks.com> --- bgpd/bgp_advertise.c | 1 + bgpd/bgp_aspath.c | 1 + bgpd/bgp_attr.c | 1 + bgpd/bgp_btoa.c | 1 + bgpd/bgp_clist.c | 1 + bgpd/bgp_damp.c | 1 + bgpd/bgp_debug.c | 1 + bgpd/bgp_dump.c | 3 ++- bgpd/bgp_ecommunity.c | 1 + bgpd/bgp_filter.c | 9 ++------- bgpd/bgp_fsm.c | 1 + bgpd/bgp_mpath.c | 1 + bgpd/bgp_mplsvpn.c | 1 + bgpd/bgp_network.c | 1 + bgpd/bgp_nexthop.c | 1 + bgpd/bgp_open.c | 1 + bgpd/bgp_packet.c | 1 + bgpd/bgp_regex.c | 1 + bgpd/bgp_table.c | 1 + bgpd/bgp_vty.c | 1 + bgpd/bgp_zebra.c | 1 + lib/filter.h | 5 +++++ lib/zebra.h | 5 ----- tests/aspath_test.c | 1 + tests/bgp_capability_test.c | 1 + tests/bgp_mp_attr_test.c | 1 + tests/bgp_mpath_test.c | 1 + tests/ecommunity_test.c | 1 + 28 files changed, 33 insertions(+), 13 deletions(-) diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c index be9b480..ecf531f 100644 --- a/bgpd/bgp_advertise.c +++ b/bgpd/bgp_advertise.c @@ -25,6 +25,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "prefix.h" #include "hash.h" #include "thread.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_table.h" diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index 9d49f34..6ab2937 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -29,6 +29,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "log.h" #include "stream.h" #include "jhash.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_aspath.h" diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index ef19bc4..ce8f8a0 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -29,6 +29,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "log.h" #include "hash.h" #include "jhash.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_attr.h" diff --git a/bgpd/bgp_btoa.c b/bgpd/bgp_btoa.c index b9ff67c..284b280 100644 --- a/bgpd/bgp_btoa.c +++ b/bgpd/bgp_btoa.c @@ -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" diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index db2cfa4..bb06028 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -23,6 +23,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "command.h" #include "prefix.h" #include "memory.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_community.h" diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c index 359fce3..ac64723 100644 --- a/bgpd/bgp_damp.c +++ b/bgpd/bgp_damp.c @@ -26,6 +26,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "command.h" #include "log.h" #include "thread.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_damp.h" diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 1d09769..e3e5ca4 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -28,6 +28,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "str.h" #include "log.h" #include "sockunion.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_aspath.h" diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 227fc7a..1fa0e65 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -27,8 +27,9 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "prefix.h" #include "thread.h" #include "linklist.h" -#include "bgpd/bgp_table.h" +#include "filter.h" +#include "bgpd/bgp_table.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_route.h" #include "bgpd/bgp_attr.h" diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index 04957d4..c76f01e 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -24,6 +24,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "memory.h" #include "prefix.h" #include "command.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_ecommunity.h" diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index fd8ece6..26819fc 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -24,6 +24,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "log.h" #include "memory.h" #include "buffer.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_aspath.h" @@ -65,18 +66,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; diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 1823336..c4cfd58 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -31,6 +31,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "memory.h" #include "plist.h" #include "workqueue.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_attr.h" diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index 7999d16..75071c1 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -28,6 +28,7 @@ #include "linklist.h" #include "sockunion.h" #include "memory.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_table.h" diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index a72d5ed..2b3b47f 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -25,6 +25,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "log.h" #include "memory.h" #include "stream.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_table.h" diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index 3c5e6c5..81a6a79 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -31,6 +31,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "privs.h" #include "linklist.h" #include "network.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_fsm.h" diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index 145a1d8..8c272f3 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -30,6 +30,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "memory.h" #include "hash.h" #include "jhash.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_table.h" diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 8042a80..e7ea68c 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -27,6 +27,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "log.h" #include "command.h" #include "memory.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_attr.h" diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index a90e56b..6d2ea62 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -31,6 +31,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "sockopt.h" #include "linklist.h" #include "plist.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_table.h" diff --git a/bgpd/bgp_regex.c b/bgpd/bgp_regex.c index 9b65f7c..13fa829 100644 --- a/bgpd/bgp_regex.c +++ b/bgpd/bgp_regex.c @@ -23,6 +23,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "log.h" #include "command.h" #include "memory.h" +#include "filter.h" #include "bgpd.h" #include "bgp_aspath.h" diff --git a/bgpd/bgp_table.c b/bgpd/bgp_table.c index 7a6c675..92bb957 100644 --- a/bgpd/bgp_table.c +++ b/bgpd/bgp_table.c @@ -24,6 +24,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "memory.h" #include "sockunion.h" #include "vty.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_table.h" diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 36fd263..efbd8db 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -30,6 +30,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "log.h" #include "memory.h" #include "hash.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_advertise.h" diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 186657b..4a25aa9 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */ #include "zclient.h" #include "routemap.h" #include "thread.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_route.h" diff --git a/lib/filter.h b/lib/filter.h index 37535cb..e6ccd33 100644 --- a/lib/filter.h +++ b/lib/filter.h @@ -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 { diff --git a/lib/zebra.h b/lib/zebra.h index c5b767d..dbb3a39 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -484,11 +484,6 @@ extern const char *zserv_command_string (unsigned int command); #define SAFI_MPLS_VPN 4 #define SAFI_MAX 5 -/* 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 diff --git a/tests/aspath_test.c b/tests/aspath_test.c index 0aa3e47..5a0899e 100644 --- a/tests/aspath_test.c +++ b/tests/aspath_test.c @@ -24,6 +24,7 @@ #include "vty.h" #include "stream.h" #include "privs.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_aspath.h" diff --git a/tests/bgp_capability_test.c b/tests/bgp_capability_test.c index 96f18f0..3edb5d8 100644 --- a/tests/bgp_capability_test.c +++ b/tests/bgp_capability_test.c @@ -25,6 +25,7 @@ #include "stream.h" #include "privs.h" #include "memory.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_open.h" diff --git a/tests/bgp_mp_attr_test.c b/tests/bgp_mp_attr_test.c index d649e14..6dc6757 100644 --- a/tests/bgp_mp_attr_test.c +++ b/tests/bgp_mp_attr_test.c @@ -25,6 +25,7 @@ #include "stream.h" #include "privs.h" #include "memory.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_attr.h" diff --git a/tests/bgp_mpath_test.c b/tests/bgp_mpath_test.c index ed54d9c..6d3d036 100644 --- a/tests/bgp_mpath_test.c +++ b/tests/bgp_mpath_test.c @@ -29,6 +29,7 @@ #include "linklist.h" #include "memory.h" #include "zclient.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_table.h" diff --git a/tests/ecommunity_test.c b/tests/ecommunity_test.c index f12aa71..23ee405 100644 --- a/tests/ecommunity_test.c +++ b/tests/ecommunity_test.c @@ -24,6 +24,7 @@ #include "stream.h" #include "privs.h" #include "memory.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_ecommunity.h" -- 1.7.10.4 _______________________________________________ Quagga-dev mailing list Quagga-dev@lists.quagga.net https://lists.quagga.net/mailman/listinfo/quagga-dev