bgpd: Move BGP_CAP_LLGR_MIN_PACKET_LEN to headers file

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2023-09-07 10:17:52 +03:00
parent 1c70a617f8
commit b1b3fc5fe0
2 changed files with 13 additions and 12 deletions

View File

@ -576,18 +576,6 @@ static int bgp_capability_restart(struct peer *peer,
static int bgp_capability_llgr(struct peer *peer,
struct capability_header *caphdr)
{
/*
* +--------------------------------------------------+
* | Address Family Identifier (16 bits) |
* +--------------------------------------------------+
* | Subsequent Address Family Identifier (8 bits) |
* +--------------------------------------------------+
* | Flags for Address Family (8 bits) |
* +--------------------------------------------------+
* | Long-lived Stale Time (24 bits) |
* +--------------------------------------------------+
*/
#define BGP_CAP_LLGR_MIN_PACKET_LEN 7
struct stream *s = BGP_INPUT(peer);
size_t end = stream_get_getp(s) + caphdr->length;

View File

@ -25,6 +25,19 @@ struct graceful_restart_af {
uint8_t flag;
};
/*
* +--------------------------------------------------+
* | Address Family Identifier (16 bits) |
* +--------------------------------------------------+
* | Subsequent Address Family Identifier (8 bits) |
* +--------------------------------------------------+
* | Flags for Address Family (8 bits) |
* +--------------------------------------------------+
* | Long-lived Stale Time (24 bits) |
* +--------------------------------------------------+
*/
#define BGP_CAP_LLGR_MIN_PACKET_LEN 7
/* Capability Code */
#define CAPABILITY_CODE_MP 1 /* Multiprotocol Extensions */
#define CAPABILITY_CODE_REFRESH 2 /* Route Refresh Capability */