gnutls_errors.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <defines.h>
00026
00027 #define GNUTLS_E_INT_RET_0 -1251
00028
00029 #ifdef __FILE__
00030 # ifdef __LINE__
00031 # define MHD_gnutls_assert() MHD__gnutls_debug_log( "ASSERT: %s:%d\n", __FILE__,__LINE__);
00032 # else
00033 # define MHD_gnutls_assert()
00034 # endif
00035 #else
00036 # define MHD_gnutls_assert()
00037 #endif
00038
00039 int MHD_gtls_asn2err (int asn_err);
00040 void MHD_gtls_log (int, const char *fmt, ...);
00041
00042 extern int MHD__gnutls_log_level;
00043
00044 #ifdef C99_MACROS
00045 #define LEVEL(l, ...) if (MHD__gnutls_log_level >= l || MHD__gnutls_log_level > 9) \
00046 MHD_gtls_log( l, __VA_ARGS__)
00047
00048 #define LEVEL_EQ(l, ...) if (MHD__gnutls_log_level == l || MHD__gnutls_log_level > 9) \
00049 MHD_gtls_log( l, __VA_ARGS__)
00050
00051 # define MHD__gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
00052 # define MHD__gnutls_handshake_log(...) LEVEL(3, __VA_ARGS__)
00053 # define MHD__gnutls_buffers_log(...) LEVEL_EQ(6, __VA_ARGS__)
00054 # define MHD__gnutls_hard_log(...) LEVEL(9, __VA_ARGS__)
00055 # define MHD__gnutls_record_log(...) LEVEL(4, __VA_ARGS__)
00056 # define MHD__gnutls_read_log(...) LEVEL_EQ(7, __VA_ARGS__)
00057 # define MHD__gnutls_write_log(...) LEVEL_EQ(7, __VA_ARGS__)
00058 # define MHD__gnutls_x509_log(...) LEVEL(1, __VA_ARGS__)
00059 #else
00060 # define MHD__gnutls_debug_log MHD__gnutls_null_log
00061 # define MHD__gnutls_handshake_log MHD__gnutls_null_log
00062 # define MHD__gnutls_buffers_log MHD__gnutls_null_log
00063 # define MHD__gnutls_hard_log MHD__gnutls_null_log
00064 # define MHD__gnutls_record_log MHD__gnutls_null_log
00065 # define MHD__gnutls_read_log MHD__gnutls_null_log
00066 # define MHD__gnutls_write_log MHD__gnutls_null_log
00067 # define MHD__gnutls_x509_log MHD__gnutls_null_log
00068
00069 void MHD__gnutls_null_log (void *, ...);
00070
00071 #endif