summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_packet.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-04-24 17:19:09 +0200
committerDavid Lamparter <equinox@diac24.net>2019-07-03 16:58:26 +0200
commit584470fb5fc611580367ff2cf15b3ab8e07ef92c (patch)
tree4c88b591ccb863646811daa7465de7f1aaa97d25 /bgpd/bgp_packet.h
parentbgpd: add instance delete & config write hooks (diff)
downloadfrr-584470fb5fc611580367ff2cf15b3ab8e07ef92c.tar.xz
frr-584470fb5fc611580367ff2cf15b3ab8e07ef92c.zip
bgpd: add & use bgp packet dump hook
The MRT dump code is already hooked in at the right places to write out packets; the BMP code needs exactly the same access so let's make this a hook. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_packet.h')
-rw-r--r--bgpd/bgp_packet.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bgpd/bgp_packet.h b/bgpd/bgp_packet.h
index 06a190585..91031589a 100644
--- a/bgpd/bgp_packet.h
+++ b/bgpd/bgp_packet.h
@@ -21,6 +21,13 @@
#ifndef _QUAGGA_BGP_PACKET_H
#define _QUAGGA_BGP_PACKET_H
+#include "hook.h"
+
+DECLARE_HOOK(bgp_packet_dump,
+ (struct peer *peer, uint8_t type, bgp_size_t size,
+ struct stream *s),
+ (peer, type, size, s))
+
#define BGP_NLRI_LENGTH 1U
#define BGP_TOTAL_ATTR_LEN 2U
#define BGP_UNFEASIBLE_LEN 2U