X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/db276bcc801cbd2662f90a6b22cfc551ecddbf0f..21ae6221cf930ed4aa9bb6a4f9cafab2cdc5fe76:/bgp.h diff --git a/bgp.h b/bgp.h index 6dbfbf8..fc2e517 100644 --- a/bgp.h +++ b/bgp.h @@ -67,6 +67,10 @@ struct bgp_mp_cap_param { 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 @@ -209,6 +213,12 @@ struct bgp_buf { size_t done; /* bytes sent/recvd */ }; +enum bgp_mp_handling { + HandleIPv6Routes, + DoesntHandleIPv6Routes, + HandlingUnknown, +}; + /* state */ struct bgp_peer { char name[32]; /* peer name */ @@ -237,7 +247,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 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];