From 85368cd4b7244535f6ce56a27f6d22ddfa2bf4e6 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 2 May 2000 16:07:41 +0000 Subject: Full protocol tracing. --- proto/bgp/bgp.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'proto/bgp/bgp.h') diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h index 2034df3..a9f3413 100644 --- a/proto/bgp/bgp.h +++ b/proto/bgp/bgp.h @@ -101,6 +101,14 @@ void bgp_check(struct bgp_config *c); void bgp_error(struct bgp_conn *c, unsigned code, unsigned subcode, byte *data, int len); void bgp_close_conn(struct bgp_conn *c); +#ifdef LOCAL_DEBUG +#define BGP_FORCE_DEBUG 1 +#else +#define BGP_FORCE_DEBUG 0 +#endif +#define BGP_TRACE(flags, msg, args...) do { if ((p->p.debug & flags) || BGP_FORCE_DEBUG) \ + log(L_TRACE "%s: " msg, p->p.name , ## args ); } while(0) + /* attrs.c */ struct rta *bgp_decode_attrs(struct bgp_conn *conn, byte *a, unsigned int len, struct linpool *pool, int mandatory); -- cgit v1.2.3