--- embedaddon/quagga/bgpd/bgp_filter.c 2012/02/21 17:26:12 1.1.1.1 +++ embedaddon/quagga/bgpd/bgp_filter.c 2016/11/02 10:09:10 1.1.1.2 @@ -24,6 +24,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330 #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; @@ -84,7 +79,7 @@ struct as_list struct as_filter *head; struct as_filter *tail; }; - + /* ip as-path access-list 10 permit AS1. */ static struct as_list_master as_list_master = @@ -370,7 +365,7 @@ as_list_filter_delete (struct as_list *aslist, struct if (as_list_master.delete_hook) (*as_list_master.delete_hook) (); } - + static int as_filter_match (struct as_filter *asfilter, struct aspath *aspath) { @@ -412,7 +407,7 @@ as_list_delete_hook (void (*func) (void)) { as_list_master.delete_hook = func; } - + static int as_list_dup_check (struct as_list *aslist, struct as_filter *new) {