/*++

Module Name:

    Trace.h

Abstract:

    Header file for the debug tracing related function defintions and macros.

Environment:

    User mode

--*/

//
// Define the tracing flags.
//
// Tracing GUID - {4F1A4DA0-3243-4707-8387-A5D78088D29D}
//

#define WPP_CONTROL_GUIDS                                               \
    WPP_DEFINE_CONTROL_GUID(                                            \
        WSocketsInterceptDllTraceGuid, (4F1A4DA0, 3243, 4707, 8387, A5D78088D29D), \
                                                                        \
        WPP_DEFINE_BIT(MYDLL_ALL_INFO)                                  \
        WPP_DEFINE_BIT(TRACE_WS2INTERCEPTDLL)                           \
        WPP_DEFINE_BIT(TRACE_DNSSOCKET)                                 \
        WPP_DEFINE_BIT(TRACE_DLLMAIN)                                   \
        WPP_DEFINE_BIT(FILE_TRACE)                                      \
        WPP_DEFINE_BIT(TRACE_DNS_MESSAGE_WB)                            \
        WPP_DEFINE_BIT(TRACE_DNS_RESORCE_RECORD)                        \
        WPP_DEFINE_BIT(TRACE_DNS_RECORD_DUMP)                           \
        WPP_DEFINE_BIT(TRACE_DNS_STATE_THREAD)                          \
        WPP_DEFINE_BIT(TRACE_DNS_FIREWALL_THREAD)                       \
        )                             

#define WPP_FLAG_LEVEL_LOGGER(flag, level)                              \
    WPP_LEVEL_LOGGER(flag)

#define WPP_FLAG_LEVEL_ENABLED(flag, level)                            \
    (WPP_LEVEL_ENABLED(flag) &&                                        \
     WPP_CONTROL(WPP_BIT_ ## flag).Level >= level)

#define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) \
           WPP_LEVEL_LOGGER(flags)
               
#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) \
           (WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl)

//
// This comment block is scanned by the trace preprocessor to define our
// Trace function.
//
// begin_wpp config
// FUNC Trace{FLAG=MYDLL_ALL_INFO}(LEVEL, MSG, ...);
// FUNC TraceEvents(LEVEL, FLAGS, MSG, ...);
// end_wpp
//
