2 #define COUNT(s) (__arraycount(s))
6 const char *(*namefunc
)(const message
*m_out
);
7 int (*outfunc
)(struct trace_proc
*proc
, const message
*m_out
);
8 void (*infunc
)(struct trace_proc
*proc
, const message
*m_out
,
9 const message
*m_in
, int failed
);
11 #define HANDLER(n,o,i) { .name = n, .outfunc = o, .infunc = i }
12 #define HANDLER_NAME(n,o,i) { .namefunc = n, .outfunc = o, .infunc = i }
17 const struct call_handler
*map
;
26 #define FLAG(f) { f, f, #f }
27 #define FLAG_MASK(m,f) { m, f, #f }
28 #define FLAG_ZERO(f) { ~0, f, #f }
30 /* not great, but it prevents a massive potential for typos.. */
31 #define NAME(r) case r: return #r
32 #define TEXT(v) case v: text = #v; break