mirror of
https://github.com/darkk/redsocks.git
synced 2025-08-25 11:15:30 +00:00
It gives ~33% increase of throughput on CPU-bound box. E.g. following machine single-connection throughput goes from ~30 Mbit/s to ~40 Mbit/s system type: xRX200 rev 1.2 machine: TDW8980 - TP-LINK TD-W8980 cpu model: MIPS 34Kc V5.6 BogoMIPS: 332.54
30 lines
938 B
C
30 lines
938 B
C
#ifndef LOG_H_WED_JAN_24_18_21_27_2007
|
|
#define LOG_H_WED_JAN_24_18_21_27_2007
|
|
|
|
#include <stdarg.h>
|
|
#include <stdbool.h>
|
|
#include <syslog.h>
|
|
|
|
#define log_errno(prio, msg...) _log_write(__FILE__, __LINE__, __func__, 1, prio, ## msg)
|
|
#define log_error(prio, msg...) _log_write(__FILE__, __LINE__, __func__, 0, prio, ## msg)
|
|
|
|
extern const char *error_lowmem;
|
|
|
|
int log_preopen(const char *dst, bool log_debug, bool log_info);
|
|
void log_open();
|
|
|
|
bool should_log(int priority);
|
|
|
|
void _log_vwrite(const char *file, int line, const char *func, int do_errno, int priority, const char *fmt, va_list ap);
|
|
|
|
void _log_write(const char *file, int line, const char *func, int do_errno, int priority, const char *fmt, ...)
|
|
#if defined(__GNUC__)
|
|
__attribute__ (( format (printf, 6, 7) ))
|
|
#endif
|
|
;
|
|
|
|
/* vim:set tabstop=4 softtabstop=4 shiftwidth=4: */
|
|
/* vim:set foldmethod=marker foldlevel=32 foldmarker={,}: */
|
|
#endif /* LOG_H_WED_JAN_24_18_21_27_2007 */
|
|
|