version 1.1, 2012/02/21 17:26:12
|
version 1.1.1.2, 2016/11/02 10:09:10
|
Line 24 Software Foundation, Inc., 59 Temple Place - Suite 330
|
Line 24 Software Foundation, Inc., 59 Temple Place - Suite 330
|
#include "log.h" |
#include "log.h" |
#include "memory.h" |
#include "memory.h" |
#include "buffer.h" |
#include "buffer.h" |
|
#include "filter.h" |
|
|
#include "bgpd/bgpd.h" |
#include "bgpd/bgpd.h" |
#include "bgpd/bgp_aspath.h" |
#include "bgpd/bgp_aspath.h" |
Line 65 struct as_filter
|
Line 66 struct as_filter
|
char *reg_str; |
char *reg_str; |
}; |
}; |
|
|
enum as_list_type |
|
{ |
|
ACCESS_TYPE_STRING, |
|
ACCESS_TYPE_NUMBER |
|
}; |
|
|
|
/* AS path filter list. */ |
/* AS path filter list. */ |
struct as_list |
struct as_list |
{ |
{ |
char *name; |
char *name; |
|
|
enum as_list_type type; | enum access_type type; |
|
|
struct as_list *next; |
struct as_list *next; |
struct as_list *prev; |
struct as_list *prev; |
Line 84 struct as_list
|
Line 79 struct as_list
|
struct as_filter *head; |
struct as_filter *head; |
struct as_filter *tail; |
struct as_filter *tail; |
}; |
}; |
| |
/* ip as-path access-list 10 permit AS1. */ |
/* ip as-path access-list 10 permit AS1. */ |
|
|
static struct as_list_master as_list_master = |
static struct as_list_master as_list_master = |
Line 370 as_list_filter_delete (struct as_list *aslist, struct
|
Line 365 as_list_filter_delete (struct as_list *aslist, struct
|
if (as_list_master.delete_hook) |
if (as_list_master.delete_hook) |
(*as_list_master.delete_hook) (); |
(*as_list_master.delete_hook) (); |
} |
} |
| |
static int |
static int |
as_filter_match (struct as_filter *asfilter, struct aspath *aspath) |
as_filter_match (struct as_filter *asfilter, struct aspath *aspath) |
{ |
{ |
Line 412 as_list_delete_hook (void (*func) (void))
|
Line 407 as_list_delete_hook (void (*func) (void))
|
{ |
{ |
as_list_master.delete_hook = func; |
as_list_master.delete_hook = func; |
} |
} |
| |
static int |
static int |
as_list_dup_check (struct as_list *aslist, struct as_filter *new) |
as_list_dup_check (struct as_list *aslist, struct as_filter *new) |
{ |
{ |