diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2023-04-28 19:13:56 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-05-01 04:01:16 +0200 |
commit | 1be0be1b71f0127740a4aa6f35d4a256d6c34fb9 (patch) | |
tree | 807420edb2dba2a8c648845a9c3e7d311692ede5 /proto/bgp/bgp.h | |
parent | a8a64ca0fed41c78376b27880e934296bd3c3a7f (diff) |
BGP: Save sent and received OPEN messages
These are necessary for BMP Peer UP message and it is better to keep them
in BGP than in BMP (so BMP could be restarted or added later).
Diffstat (limited to 'proto/bgp/bgp.h')
-rw-r--r-- | proto/bgp/bgp.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h index 7c96e851..5f8f183d 100644 --- a/proto/bgp/bgp.h +++ b/proto/bgp/bgp.h @@ -287,6 +287,11 @@ struct bgp_conn { u8 ext_messages; /* Session uses extended message length */ u32 received_as; /* ASN received in OPEN message */ + byte *local_open_msg; /* Saved OPEN messages (no header) */ + byte *remote_open_msg; + uint local_open_length; + uint remote_open_length; + struct bgp_caps *local_caps; struct bgp_caps *remote_caps; timer *connect_timer; @@ -487,6 +492,7 @@ struct bgp_parse_state { #define BGP_PORT 179 #define BGP_VERSION 4 #define BGP_HEADER_LENGTH 19 +#define BGP_HDR_MARKER_LENGTH 16 #define BGP_MAX_MESSAGE_LENGTH 4096 #define BGP_MAX_EXT_MSG_LENGTH 65535 #define BGP_RX_BUFFER_SIZE 4096 |