forked from gssapi/gssproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgp_debug.h
More file actions
36 lines (27 loc) · 841 Bytes
/
gp_debug.h
File metadata and controls
36 lines (27 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* Copyright (C) 2011,2018 the GSS-PROXY contributors, see COPYING for license */
#ifndef _GP_DEBUG_H_
#define _GP_DEBUG_H_
#include <gssapi/gssapi.h>
#include <stdarg.h>
#include <stdio.h>
#include <time.h>
#define GP_INFO_DEBUG_LVL 1
extern int gp_debug;
void gp_debug_check_env_(void);
void gp_debug_toggle(int);
void gp_debug_printf(const char *format, ...);
void gp_debug_time_printf(const char *format, ...);
void gp_debug_set_conn_id(int id);
void gp_debug_set_krb5_tracing_fn(void (*fn)(int));
#define GPDEBUG(...) do { \
if (gp_debug) { \
gp_debug_time_printf(__VA_ARGS__); \
} \
} while(0)
#define GPDEBUGN(lvl, ...) do { \
if (lvl <= gp_debug) { \
gp_debug_time_printf(__VA_ARGS__); \
} \
} while(0)
void gp_log_failure(gss_OID mech, uint32_t maj, uint32_t min);
#endif /* _GP_DEBUG_H_ */