OpenVPN
|
#include "syshead.h"
#include "status.h"
#include "perf.h"
#include "misc.h"
#include "fdmisc.h"
#include "memdbg.h"
Go to the source code of this file.
Macros | |
#define | STATUS_PRINTF_MAXLEN 512 |
Functions | |
static const char * | print_status_mode (unsigned int flags) |
struct status_output * | status_open (const char *filename, const int refresh_freq, const int msglevel, const struct virtual_output *vout, const unsigned int flags) |
bool | status_trigger (struct status_output *so) |
void | status_reset (struct status_output *so) |
void | status_flush (struct status_output *so) |
bool | status_close (struct status_output *so) |
void | status_printf (struct status_output *so, const char *format,...) |
bool | status_read (struct status_output *so, struct buffer *buf) |
|
static |
Definition at line 42 of file status.c.
References STATUS_OUTPUT_READ, and STATUS_OUTPUT_WRITE.
Referenced by status_open().
bool status_close | ( | struct status_output * | so | ) |
Definition at line 188 of file status.c.
References buf_defined(), status_output::errors, status_output::fd, status_output::filename, free_buf(), and status_output::read_buf.
Referenced by do_close_status_output(), ifconfig_pool_msg(), ifconfig_pool_persist_close(), init_static(), man_process_command(), multi_process_signal(), process_sigusr2(), verify_crresponse_script(), and verify_user_pass_script().
void status_flush | ( | struct status_output * | so | ) |
Definition at line 157 of file status.c.
References ASSERT, buf_defined(), buf_init, status_output::fd, status_output::flags, M_ERRNO, M_WARN, msg, status_output::read_buf, and STATUS_OUTPUT_WRITE.
Referenced by ifconfig_pool_write(), multi_print_status(), and print_status().
struct status_output* status_open | ( | const char * | filename, |
const int | refresh_freq, | ||
const int | msglevel, | ||
const struct virtual_output * | vout, | ||
const unsigned int | flags | ||
) |
Definition at line 61 of file status.c.
References alloc_buf(), ALLOC_OBJ_CLEAR, ASSERT, buf_reset(), status_output::errors, status_output::et, event_timeout_clear(), event_timeout_init(), status_output::fd, status_output::filename, status_output::flags, M_WARN, msg, status_output::msglevel, platform_open(), print_status_mode(), status_output::read_buf, set_cloexec(), STATUS_OUTPUT_READ, STATUS_OUTPUT_WRITE, string_alloc(), and status_output::vout.
Referenced by do_open_status_output(), ifconfig_pool_msg(), ifconfig_pool_persist_init(), init_static(), man_process_command(), multi_process_signal(), process_sigusr2(), verify_crresponse_script(), and verify_user_pass_script().
void status_printf | ( | struct status_output * | so, |
const char * | format, | ||
... | |||
) |
Definition at line 222 of file status.c.
References virtual_output::arg, chomp(), status_output::errors, status_output::fd, status_output::flags, virtual_output::flags_default, virtual_output::func, msg, status_output::msglevel, STATUS_OUTPUT_WRITE, STATUS_PRINTF_MAXLEN, status_output::vout, and write.
Referenced by ifconfig_pool_list(), ifconfig_pool_msg(), init_static(), multi_print_status(), print_status(), verify_crresponse_script(), and verify_user_pass_script().
bool status_read | ( | struct status_output * | so, |
struct buffer * | buf | ||
) |
Definition at line 268 of file status.c.
References ASSERT, BCAP, BPTR, buf_defined(), buf_inc_len(), buf_init, buf_null_terminate(), buf_read_u8(), buf_write_u8(), status_output::fd, status_output::flags, read, status_output::read_buf, and STATUS_OUTPUT_READ.
Referenced by ifconfig_pool_read().
void status_reset | ( | struct status_output * | so | ) |
Definition at line 148 of file status.c.
References status_output::fd.
Referenced by ifconfig_pool_write(), multi_print_status(), and print_status().
bool status_trigger | ( | struct status_output * | so | ) |
Definition at line 133 of file status.c.
References CLEAR, status_output::et, ETT_DEFAULT, and event_timeout_trigger().
Referenced by ifconfig_pool_write_trigger(), and multi_process_per_second_timers_dowork().