/* BGPv4 (RFC1771) */
-/* $Id: bgp.h,v 1.5 2005/06/04 15:42:35 bodea Exp $ */
+/* $Id: bgp.h,v 1.5 2005-06-04 15:42:35 bodea Exp $ */
#ifndef __BGP_H__
#define __BGP_H__
uint8_t safi;
} __attribute__ ((packed));
+/* bgp_mp_cap_param.afi */
+#define BGP_MP_AFI_RESERVED 0
+#define BGP_MP_AFI_IPv4 1
+#define BGP_MP_AFI_IPv6 2
/* bgp_mp_cap_param.safi */
#define BGP_MP_SAFI_UNICAST 1
#define BGP_MP_SAFI_MULTICAST 2
struct bgp_peer {
char name[32]; /* peer name */
in_addr_t addr; /* peer address */
+ in_addr_t source_addr; /* our source address */
int as; /* AS number */
int sock;
enum bgp_state state; /* FSM state */
/* actions */
int bgp_setup(int as);
int bgp_start(struct bgp_peer *peer, char *name, int as, int keepalive,
- int hold, int enable);
+ int hold, struct in_addr update_source, int enable);
void bgp_stop(struct bgp_peer *peer);
void bgp_halt(struct bgp_peer *peer);
int bgp_restart(struct bgp_peer *peer);
-int bgp_add_route(in_addr_t ip, in_addr_t mask);
+int bgp_add_route(in_addr_t ip, int prefixlen);
int bgp_add_route6(struct in6_addr ip, int prefixlen);
-int bgp_del_route(in_addr_t ip, in_addr_t mask);
+int bgp_del_route(in_addr_t ip, int prefixlen);
int bgp_del_route6(struct in6_addr ip, int prefixlen);
void bgp_enable_routing(int enable);
int bgp_set_poll(void);
int bgp_process(uint32_t events[]);
+void bgp_process_peers_timers();
char const *bgp_state_str(enum bgp_state state);
-extern char const *cvs_id_bgp;
-
#endif /* __BGP_H__ */