summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-02 16:07:41 +0000
committerMartin Mares <mj@ucw.cz>2000-05-02 16:07:41 +0000
commit85368cd4b7244535f6ce56a27f6d22ddfa2bf4e6 (patch)
treedb9b8baef6c68e36c2c6d34b24f8145386328bea /proto/bgp/bgp.h
parent85a291ff3055f0b10ffc199138c67305f5b3fc98 (diff)
Full protocol tracing.
Diffstat (limited to 'proto/bgp/bgp.h')
-rw-r--r--proto/bgp/bgp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
index 2034df38..a9f3413c 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);