OpenVPN
|
#include "interval.h"
Go to the source code of this file.
Data Structures | |
struct | virtual_output |
struct | status_output |
Macros | |
#define | STATUS_OUTPUT_READ (1<<0) |
#define | STATUS_OUTPUT_WRITE (1<<1) |
Functions | |
static void | virtual_output_print (const struct virtual_output *vo, const unsigned int flags, const char *str) |
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 unsigned int | status_rw_flags (const struct status_output *so) |
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().
|
inlinestatic |
Definition at line 93 of file status.h.
References status_output::flags.
Referenced by ifconfig_pool_write().
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().
|
inlinestatic |
Definition at line 39 of file status.h.
References virtual_output::arg, and virtual_output::func.
Referenced by x_msg_va().