nmc-utils
0.1.1
|
#include <stdio.h>
#include <getopt.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <sys/select.h>
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
#include <termios.h>
#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
#include <stdint.h>
#include <errno.h>
#include <sys/epoll.h>
#include <syslog.h>
#include <easynmc.h>
Go to the source code of this file.
Data Structures | |
struct | nmc_logger_core |
Macros | |
#define | _GNU_SOURCE |
#define | MODE_SYSLOG 2 |
#define | MODE_STDOUT 1 |
#define | MODE_FILE 0 |
#define | dbg(fmt,...) |
#define | err(fmt,...) |
#define | BUFSIZE 2048 |
Functions | |
void | usage (char *nm) |
int | add_core_to_logger (char *prefix, int numcore, int efd) |
void | log_string_stdout (struct nmc_logger_core *core, char *str) |
void | log_string_syslog (struct nmc_logger_core *core, char *str) |
void | log_string_file (struct nmc_logger_core *core, char *str) |
int | main (int argc, char *argv[]) |
#define BUFSIZE 2048 |
Referenced by main().
#define dbg | ( | fmt, | |
... | |||
) |
#define err | ( | fmt, | |
... | |||
) |
int add_core_to_logger | ( | char * | prefix, |
int | numcore, | ||
int | efd | ||
) |
Definition at line 126 of file nmlogd.c.
References easynmc_open(), nmc_logger_core::h, easynmc_handle::iofd, nmc_logger_core::logprefix, and nmc_logger_core::rfd.
Referenced by main().
void log_string_file | ( | struct nmc_logger_core * | core, |
char * | str | ||
) |
void log_string_stdout | ( | struct nmc_logger_core * | core, |
char * | str | ||
) |
Definition at line 151 of file nmlogd.c.
References nmc_logger_core::logprefix.
Referenced by main().
void log_string_syslog | ( | struct nmc_logger_core * | core, |
char * | str | ||
) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 166 of file nmlogd.c.
References add_core_to_logger(), BUFSIZE, dbg, err, log_string_stdout(), nmc_logger_core::rfd, and usage().