nut/clients/upslog.h

43 lines
836 B
C
Raw Permalink Normal View History

2010-03-25 23:20:59 +00:00
/* upslog.h - table of functions for handling various logging functions */
2013-11-24 15:00:12 +00:00
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
2010-03-25 23:20:59 +00:00
/* function list */
2011-01-26 09:35:08 +00:00
typedef struct flist_s {
2010-03-25 23:20:59 +00:00
void (*fptr)(const char *arg);
const char *arg;
2011-01-26 09:35:08 +00:00
struct flist_s *next;
} flist_t;
2010-03-25 23:20:59 +00:00
static void do_host(const char *arg);
static void do_upshost(const char *arg);
static void do_pid(const char *arg);
static void do_time(const char *arg);
static void do_var(const char *arg);
static void do_etime(const char *arg);
struct {
const char *name;
void (*func)(const char *arg);
} logcmds[] =
{
{ "HOST", do_host },
{ "UPSHOST", do_upshost },
{ "PID", do_pid },
{ "TIME", do_time },
{ "VAR", do_var },
{ "ETIME", do_etime },
{ NULL, (void(*)())(NULL) }
};
2013-11-24 15:00:12 +00:00
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif