bgpd: implement route-map set as-path prepend last-as
It picks up the AS to add from the aspath, or uses the peers
AS number. Useful mostly in iBGP setups.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Reviewed-by: Paul Jakma <paul@opensourcerouting.org>
diff --git a/bgpd/bgp_aspath.h b/bgpd/bgp_aspath.h
index e8764cc..1311f8a 100644
--- a/bgpd/bgp_aspath.h
+++ b/bgpd/bgp_aspath.h
@@ -71,6 +71,7 @@
extern struct aspath *aspath_aggregate (struct aspath *, struct aspath *);
extern struct aspath *aspath_prepend (struct aspath *, struct aspath *);
extern struct aspath *aspath_filter_exclude (struct aspath *, struct aspath *);
+extern struct aspath *aspath_add_seq_n (struct aspath *, as_t, unsigned);
extern struct aspath *aspath_add_seq (struct aspath *, as_t);
extern struct aspath *aspath_add_confed_seq (struct aspath *, as_t);
extern int aspath_cmp (const void *, const void *);
@@ -97,6 +98,7 @@
extern unsigned int aspath_count_confeds (struct aspath *);
extern unsigned int aspath_size (struct aspath *);
extern as_t aspath_highest (struct aspath *);
+extern as_t aspath_leftmost (struct aspath *);
extern size_t aspath_put (struct stream *, struct aspath *, int);
extern struct aspath *aspath_reconcile_as4 (struct aspath *, struct aspath *);