#define COMMUNITY_LIST_STRING 0
#define COMMUNITY_LIST_NUMBER 1
+#define COMMUNITY_SEQ_NUMBER_AUTO -1
+
/* Community-list entry types. */
#define COMMUNITY_LIST_STANDARD 0 /* Standard community-list. */
#define COMMUNITY_LIST_EXPANDED 1 /* Expanded community-list. */
/* Any match. */
uint8_t any;
+ /* Sequence number. */
+ int64_t seq;
+
/* Community structure. */
union {
struct community *com;
extern void community_list_terminate(struct community_list_handler *);
extern int community_list_set(struct community_list_handler *ch,
- const char *name, const char *str, int direct,
- int style);
+ const char *name, const char *str,
+ const char *seq, int direct, int style);
extern int community_list_unset(struct community_list_handler *ch,
- const char *name, const char *str, int direct,
- int style);
+ const char *name, const char *str,
+ const char *seq, int direct, int style);
extern int extcommunity_list_set(struct community_list_handler *ch,
- const char *name, const char *str, int direct,
- int style);
+ const char *name, const char *str,
+ const char *seq, int direct, int style);
extern int extcommunity_list_unset(struct community_list_handler *ch,
const char *name, const char *str,
- int direct, int style);
+ const char *seq, int direct, int style);
extern int lcommunity_list_set(struct community_list_handler *ch,
- const char *name, const char *str, int direct,
- int style);
+ const char *name, const char *str,
+ const char *seq, int direct, int style);
extern int lcommunity_list_unset(struct community_list_handler *ch,
- const char *name, const char *str, int direct,
- int style);
+ const char *name, const char *str,
+ const char *seq, int direct, int style);
extern struct community_list_master *
community_list_master_lookup(struct community_list_handler *, int);
extern int lcommunity_list_match(struct lcommunity *, struct community_list *);
extern int community_list_exact_match(struct community *,
struct community_list *);
+extern int lcommunity_list_exact_match(struct lcommunity *lcom,
+ struct community_list *list);
extern struct community *community_list_match_delete(struct community *,
struct community_list *);
extern struct lcommunity *
static inline uint32_t bgp_clist_hash_key(char *name)
{
- return jhash(name, sizeof(name), 0xdeadbeaf);
+ return jhash(name, strlen(name), 0xdeadbeaf);
}
#endif /* _QUAGGA_BGP_CLIST_H */