OpenSDN source code
gmpr_trace.h
Go to the documentation of this file.
1 /* $Id: gmpr_trace.h 514187 2012-05-06 12:25:25Z ib-builder $
2  *
3  * gmpr_trace.h - GMP router-side trace support
4  *
5  * Dave Katz, March 2008
6  *
7  * Copyright (c) 2008, Juniper Networks, Inc.
8  * Copyright Contributors to the OpenSDN project
9  * All rights reserved.
10  */
11 
12 /*
13  * Conditional tracing
14  */
15 #define gmpr_trace(instance, flag, ...) \
16  if (instance->rinst_traceflags & (flag)) \
17  gmpx_trace(instance->rinst_context, __VA_ARGS__)
18 
19 /*
20  * Unconditional tracing
21  */
22 #define gmpr_trace_uncond(instance, ...) \
23  gmpx_trace(instance->rinst_context, __VA_ARGS__)
24 
25 /*
26  * Tracing in Contrail Agent
27  */
28 #define gmpr_trace_agent(...) \
29  gmpx_trace(NULL, __VA_ARGS__)
30 
31 /*
32  * Error event
33  */
34 #define gmpr_post_event(instance, ev, ...) \
35  gmpx_post_event(instance->rinst_context, ev, __VA_ARGS__)
36 
37 
38 /*
39  * Event tracing flags.
40  *
41  * Beware that the low order bits are defined in gmp_trace.h!
42  */
43 
44 #define GMPR_TRACE_GROUP 0x00000100 /* Group activity */
45 #define GMPR_TRACE_HOST_NOTIFY 0x00000200 /* Host notification */
46 #define GMPR_TRACE_CLIENT_NOTIFY 0x00000400 /* Client notification */
47 
48 extern const char *
50 extern const char *
gmpr_client_notification_type
Definition: gmp_router.h:232
gmpr_client_host_notification_type
Definition: gmp_router.h:262
const char * gmpr_client_notif_string(gmpr_client_notification_type type)
const char * gmpr_host_notif_string(gmpr_client_host_notification_type type)
uint8_t type
Definition: load_balance.h:2