gnutls_errors.c File Reference

#include <gnutls_int.h>
#include "gnutls_errors.h"
#include <libtasn1.h>

Include dependency graph for gnutls_errors.c:

Go to the source code of this file.

Defines

#define _(String)   (String)
#define N_(String)   (String)
#define ERROR_ENTRY(desc, name, fatal)   { desc, #name, name, fatal}
#define GNUTLS_ERROR_LOOP(b)
#define GNUTLS_ERROR_ALG_LOOP(a)   GNUTLS_ERROR_LOOP( if(p->number == error) { a; break; } )

Typedefs

typedef struct
MHD_gnutls_error_entry 
MHD_gnutls_error_entry

Functions

int MHD_gtls_error_is_fatal (int error)
void MHD_gtls_perror (int error)
const char * MHD_gtls_strerror (int error)
const char * MHD__gnutls_strerror (int error)
int MHD_gtls_asn2err (int asn_err)
void MHD_gtls_log (int level, const char *fmt,...)
void MHD__gnutls_null_log (void *n,...)

Variables

LOG_FUNC MHD__gnutls_log_func
static const MHD_gnutls_error_entry MHD_gtls_error_algorithms []


Define Documentation

#define _ ( String   )     (String)

Definition at line 33 of file gnutls_errors.c.

Referenced by MHD__gnutls_strerror(), MHD_gtls_perror(), and MHD_gtls_strerror().

#define ERROR_ENTRY ( desc,
name,
fatal   )     { desc, #name, name, fatal}

Definition at line 38 of file gnutls_errors.c.

#define GNUTLS_ERROR_ALG_LOOP (  )     GNUTLS_ERROR_LOOP( if(p->number == error) { a; break; } )

#define GNUTLS_ERROR_LOOP (  ) 

Value:

const MHD_gnutls_error_entry *p; \
                for(p = MHD_gtls_error_algorithms; p->desc != NULL; p++) { b ; }

Definition at line 248 of file gnutls_errors.c.

#define N_ ( String   )     (String)

Definition at line 34 of file gnutls_errors.c.


Typedef Documentation

Definition at line 48 of file gnutls_errors.c.


Function Documentation

void MHD__gnutls_null_log ( void *  n,
  ... 
)

Definition at line 402 of file gnutls_errors.c.

const char* MHD__gnutls_strerror ( int  error  ) 

Definition at line 332 of file gnutls_errors.c.

References _, and GNUTLS_ERROR_ALG_LOOP.

int MHD_gtls_asn2err ( int  asn_err  ) 

int MHD_gtls_error_is_fatal ( int  error  ) 

MHD_gtls_error_is_fatal - Returns non-zero in case of a fatal error : is an error returned by a gnutls function. Error should be a negative value.

If a function returns a negative value you may feed that value to this function to see if it is fatal. Returns 1 for a fatal error 0 otherwise. However you may want to check the error code manually, since some non-fatal errors to the protocol may be fatal for you (your program).

This is only useful if you are dealing with errors from the record layer or the handshake layer.

For positive values, 0 is returned.

Definition at line 274 of file gnutls_errors.c.

References GNUTLS_ERROR_ALG_LOOP.

Referenced by MHD_gtls_io_read_buffered(), MHD_gtls_recv_int(), and MHD_gtls_send_int().

Here is the caller graph for this function:

void MHD_gtls_log ( int  level,
const char *  fmt,
  ... 
)

Definition at line 385 of file gnutls_errors.c.

References MAX_LOG_SIZE, and MHD__gnutls_log_func.

void MHD_gtls_perror ( int  error  ) 

MHD_gtls_perror - prints a string to stderr with a description of an error : is an error returned by a gnutls function. Error is always a negative value.

This function is like perror(). The only difference is that it accepts an error number returned by a gnutls function.

Definition at line 296 of file gnutls_errors.c.

References _, and GNUTLS_ERROR_ALG_LOOP.

const char* MHD_gtls_strerror ( int  error  ) 

MHD_gtls_strerror - Returns a string with a description of an error : is an error returned by a gnutls function. Error is always a negative value.

This function is similar to strerror(). Differences: it accepts an error number returned by a gnutls function; In case of an unknown error a descriptive string is sent instead of NULL.

Definition at line 317 of file gnutls_errors.c.

References _, and GNUTLS_ERROR_ALG_LOOP.

Referenced by MHD_gtls_remove_unwanted_ciphersuites().

Here is the caller graph for this function:


Variable Documentation

Definition at line 53 of file gnutls_global.c.

Referenced by MHD_gtls_global_set_log_function(), and MHD_gtls_log().

Definition at line 50 of file gnutls_errors.c.


Generated on Sun Jul 26 17:22:20 2009 for GNU libmicrohttpd by  doxygen 1.5.9