diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-02-19 23:07:01 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-02-19 23:07:01 +0000 |
commit | 49f8c3fdbbe774bfbfa3545849045a6c406ed026 (patch) | |
tree | 7d170651e7f9d33ac46f5de5e58fdc0d76a504b3 /usr.sbin/bgpd/rde.h | |
parent | e45a0a2546dfa029ffe0b93d1a4bc268f2e37c42 (diff) |
Add support for basic filters. Nothing optimized and it has some issues but
this is a huge step forward. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/rde.h')
-rw-r--r-- | usr.sbin/bgpd/rde.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h index b1428b28a1f..eb12f60dae2 100644 --- a/usr.sbin/bgpd/rde.h +++ b/usr.sbin/bgpd/rde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.h,v 1.28 2004/02/18 23:18:16 claudio Exp $ */ +/* $OpenBSD: rde.h,v 1.29 2004/02/19 23:07:00 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and @@ -82,9 +82,8 @@ struct rde_peer { struct aspath_hdr { u_int16_t len; /* total length of aspath in octets */ - u_int16_t as_cnt; /* total number of AS's */ - /* probably we should switch these to int or something similar */ - /* char *str; string representation of aspath for regex search. */ + u_int16_t as_cnt; /* number of AS's in data */ + u_int16_t prepend; }; struct aspath { @@ -220,6 +219,7 @@ u_char *attr_error(u_char *, u_int16_t, struct attr_flags *, u_int8_t attr_missing(struct attr_flags *, int); int attr_compare(struct attr_flags *, struct attr_flags *); void attr_copy(struct attr_flags *, struct attr_flags *); +void attr_free(struct attr_flags *); int attr_write(void *, u_int16_t, u_int8_t, u_int8_t, void *, u_int16_t); int attr_optadd(struct attr_flags *, u_int8_t, u_int8_t, @@ -291,5 +291,9 @@ void pt_remove(struct pt_entry *); struct pt_entry *pt_lookup(struct bgpd_addr *); void pt_dump(void (*)(struct pt_entry *, void *), void *); +/* rde_filter.c */ +enum filter_actions rde_filter(struct rde_peer *, struct attr_flags *, + struct bgpd_addr *, u_int8_t, enum directions); +void rde_apply_set(struct attr_flags *, struct filter_set *); #endif /* __RDE_H__ */ |