projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'common-cvs-git-upstream' into fdn-mods
[l2tpns.git]
/
bgp.h
diff --git
a/bgp.h
b/bgp.h
index
6dbfbf8
..
8e636ab
100644
(file)
--- a/
bgp.h
+++ b/
bgp.h
@@
-1,5
+1,5
@@
/* BGPv4 (RFC1771) */
/* 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__
#ifndef __BGP_H__
#define __BGP_H__
@@
-67,6
+67,10
@@
struct bgp_mp_cap_param {
uint8_t safi;
} __attribute__ ((packed));
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
/* bgp_mp_cap_param.safi */
#define BGP_MP_SAFI_UNICAST 1
#define BGP_MP_SAFI_MULTICAST 2
@@
-209,10
+213,17
@@
struct bgp_buf {
size_t done; /* bytes sent/recvd */
};
size_t done; /* bytes sent/recvd */
};
+enum bgp_mp_handling {
+ HandleIPv6Routes,
+ DoesntHandleIPv6Routes,
+ HandlingUnknown,
+};
+
/* state */
struct bgp_peer {
char name[32]; /* peer name */
in_addr_t addr; /* peer address */
/* state */
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 */
int as; /* AS number */
int sock;
enum bgp_state state; /* FSM state */
@@
-237,7
+248,7
@@
struct bgp_peer {
int path_attr_len_without_nexthop; /* length of path attrs without NEXT_HOP */
uint32_t events; /* events to poll */
struct event_data edata; /* poll data */
int path_attr_len_without_nexthop; /* length of path attrs without NEXT_HOP */
uint32_t events; /* events to poll */
struct event_data edata; /* poll data */
-
int handle_ipv6_routes; /* can handle
IPv6 routes advertisements */
+
enum bgp_mp_handling mp_handling; /* how it handles
IPv6 routes advertisements */
int update_routes6; /* UPDATE required for IPv6 routes */
struct bgp_route6_list *routes6; /* IPv6 routes known by this peer */
char mp_reach_nlri_partial[BGP_PATH_ATTR_MP_REACH_NLRI_PARTIAL_SIZE];
int update_routes6; /* UPDATE required for IPv6 routes */
struct bgp_route6_list *routes6; /* IPv6 routes known by this peer */
char mp_reach_nlri_partial[BGP_PATH_ATTR_MP_REACH_NLRI_PARTIAL_SIZE];
@@
-255,20
+266,19
@@
extern int bgp_configured;
/* actions */
int bgp_setup(int as);
int bgp_start(struct bgp_peer *peer, char *name, int as, int keepalive,
/* 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);
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, in
t prefixlen
);
int bgp_add_route6(struct in6_addr 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, in
t 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[]);
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);
char const *bgp_state_str(enum bgp_state state);
-extern char const *cvs_id_bgp;
-
#endif /* __BGP_H__ */
#endif /* __BGP_H__ */