libpcap  1.10.1
About: libpcap is a packet filter library used by tools like tcpdump.
  Fossies Dox: libpcap-1.10.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

log.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <syslog.h>
#include "portability.h"
#include "log.h"
Include dependency graph for log.c:

Go to the source code of this file.

Functions

static void rpcapd_vlog_stderr (log_priority, const char *, va_list)
 
static void rpcapd_vlog_systemlog (log_priority, const char *, va_list)
 
void rpcapd_log_set (int log_to_systemlog_arg, int log_debug_messages_arg)
 
void rpcapd_log (log_priority priority, const char *message,...)
 

Variables

static int log_to_systemlog
 
static int log_debug_messages
 

Function Documentation

◆ rpcapd_log()

◆ rpcapd_log_set()

void rpcapd_log_set ( int  log_to_systemlog_arg,
int  log_debug_messages_arg 
)

Definition at line 238 of file log.c.

References log_debug_messages, and log_to_systemlog.

Referenced by main().

◆ rpcapd_vlog_stderr()

static void rpcapd_vlog_stderr ( log_priority  priority,
const char *  message,
va_list  ap 
)
static

Definition at line 46 of file log.c.

References LOGPRIO_DEBUG, LOGPRIO_ERROR, LOGPRIO_INFO, and LOGPRIO_WARNING.

Referenced by rpcapd_log().

◆ rpcapd_vlog_systemlog()

static void rpcapd_vlog_systemlog ( log_priority  priority,
const char *  message,
va_list  ap 
)
static

Definition at line 173 of file log.c.

References LOGPRIO_DEBUG, LOGPRIO_ERROR, LOGPRIO_INFO, LOGPRIO_WARNING, openlog(), syslog(), and vsnprintf().

Referenced by rpcapd_log().

Variable Documentation

◆ log_debug_messages

int log_debug_messages
static

Definition at line 41 of file log.c.

Referenced by main(), rpcapd_log(), and rpcapd_log_set().

◆ log_to_systemlog

int log_to_systemlog
static

Definition at line 40 of file log.c.

Referenced by main(), rpcapd_log(), and rpcapd_log_set().