Página principal | Lista de componentes | Lista de archivos | Miembros de las clases | Archivos de los miembros

Referencia del Archivo mensajes.h

#include "general_var.h"
#include "estructuras.h"
#include <errno.h>
#include <string.h>
#include <time.h>

Definiciones

#define LOGAUTH(DATOS_CLIENTE)
#define LOGNOAUTH(DATOS_CLIENTE)
#define LOGCMD(CMD)
#define LOGTHISMSG(msg_info)
#define LOGERR()
#define LOGTHISERR(MSGERR)

Descripción detallada

En este archivo se incluyen macros destinadas a facilitar la tarea de escribir mensajes de logeo, de acuerdo a un formato establecido.

Documentación de las definiciones

#define LOGAUTH DATOS_CLIENTE   ) 
 

Valor:

tiempo = time(NULL); \
  tmPtr = localtime(&tiempo); \
  strftime( cad, 20,"%b %d %H:%M:%S", tmPtr ); \
  fprintf(MSG,"<MSG codigo=\"1\"><TIME> %s </TIME> Autenticación correcta<IP> %s </IP></MSG> \n",cad,inet_ntoa((DATOS_CLIENTE).ip_origen));
Imprime un mensaje de autenticación correcta junto con la Ip del cliente

#define LOGCMD CMD   ) 
 

Valor:

tiempo = time(NULL); \
  tmPtr = localtime(&tiempo); \
  strftime( cad, 20,"%b %d %H:%M:%S", tmPtr ); \
  fprintf(MSG,"<MSG codigo=\"3\"> <TIME> %s </TIME> Ejecutando %s....</MSG>\n",cad,CMD);
Imprime un mensaje indicando el comando que va a ejecutarse

 
#define LOGERR  ) 
 

Valor:

tiempo = time(NULL); \
  tmPtr = localtime(&tiempo); \
  strftime( cad, 20,"%b %d %H:%M.%S", tmPtr ); \
  fprintf(ERR,"<MSG codigo=\"-1\"><TIME> %s </TIME> Error: %s \n ",cad,strerror(errno));
Imprime un error junto con el mensaje de la variable de error errno

#define LOGNOAUTH DATOS_CLIENTE   ) 
 

Valor:

tiempo = time(NULL); \
  tmPtr = localtime(&tiempo); \
  strftime( cad, 20,"%b %d %H:%M:%S", tmPtr ); \
  fprintf(MSG,"<MSG codigo=\"2\"> <TIME> %s </TIME> Intento incorrecto <IP> %s </IP></MSG> \n",cad,inet_ntoa((DATOS_CLIENTE).ip_origen));
Imprime un mensaje de error de autenticación junto con la Ip del cliente

#define LOGTHISERR MSGERR   ) 
 

Valor:

tiempo = time(NULL); \
  tmPtr = localtime(&tiempo); \
  strftime( cad, 20,"%b %d %H:%M.%S", tmPtr ); \
  fprintf(ERR,"<MSG codigo=\"-1\"><TIME> %s </TIME> Error: %s \n ",cad,MSGERR);
Imprime un error con el mensaje indicado como parámetro

#define LOGTHISMSG msg_info   ) 
 

Valor:

tiempo = time(NULL); \
  tmPtr = localtime(&tiempo); \
  strftime( cad, 20,"%b %d %H:%M.%S", tmPtr ); \
  fprintf(MSG,"<TIME> %s </TIME> <MSG> %s <MSG>",cad,msg_info);
Imprime un mensaje


Generado el Mon Sep 19 00:05:20 2005 para PuerTock por  doxygen 1.3.9.1