OpenVPN
Macros | Functions | Variables
manage.c File Reference
#include "syshead.h"
#include "error.h"
#include "fdmisc.h"
#include "options.h"
#include "sig.h"
#include "event.h"
#include "otime.h"
#include "integer.h"
#include "misc.h"
#include "ssl.h"
#include "common.h"
#include "manage.h"
#include "memdbg.h"
Include dependency graph for manage.c:

Go to the source code of this file.

Macros

#define MANAGEMENT_ECHO_PULL_INFO   0
 
#define MANAGEMENT_ECHO_FLAGS   0
 
#define AF_DID_PUSH   (1<<0)
 
#define AF_DID_RESET   (1<<1)
 
#define IER_RESET   0
 
#define IER_NEW   1
 
#define MN_AT_LEAST   (1<<0)
 
#define MWCC_PASSWORD_WAIT   (1<<0)
 
#define MWCC_HOLD_WAIT   (1<<1)
 
#define MWCC_OTHER_WAIT   (1<<2)
 

Functions

static void man_output_standalone (struct management *man, volatile int *signal_received)
 
static void man_reset_client_socket (struct management *man, const bool exiting)
 
static void man_help (void)
 
static const char * man_state_name (const int state)
 
static void man_welcome (struct management *man)
 
static bool man_password_needed (struct management *man)
 
static void man_check_password (struct management *man, const char *line)
 
static void man_update_io_state (struct management *man)
 
static void man_output_list_push_finalize (struct management *man)
 
static void man_output_list_push_str (struct management *man, const char *str)
 
static void man_output_list_push (struct management *man, const char *str)
 
static void man_prompt (struct management *man)
 
static void man_delete_unix_socket (struct management *man)
 
static void man_close_socket (struct management *man, const socket_descriptor_t sd)
 
static void virtual_output_callback_func (void *arg, const unsigned int flags, const char *str)
 
static int man_mod_signal (const struct management *man, const int signum)
 
static void man_signal (struct management *man, const char *name)
 
static void man_status (struct management *man, const int version, struct status_output *so)
 
static void man_bytecount (struct management *man, const int update_seconds)
 
void man_bytecount_output_client (struct management *man)
 
static void man_kill (struct management *man, const char *victim)
 
static void man_history (struct management *man, const char *parm, const char *type, struct log_history *log, bool *realtime, const unsigned int lep_flags)
 
static void man_log (struct management *man, const char *parm)
 
static void man_echo (struct management *man, const char *parm)
 
static void man_state (struct management *man, const char *parm)
 
static void man_up_finalize (struct management *man)
 
static void man_query_user_pass (struct management *man, const char *type, const char *string, const bool needed, const char *prompt, char *dest, int len)
 
static void man_query_username (struct management *man, const char *type, const char *string)
 
static void man_query_password (struct management *man, const char *type, const char *string)
 
static void man_query_need_ok (struct management *man, const char *type, const char *action)
 
static void man_query_need_str (struct management *man, const char *type, const char *action)
 
static void man_forget_passwords (struct management *man)
 
static void man_net (struct management *man)
 
static void man_hold (struct management *man, const char *cmd)
 
static void in_extra_reset (struct man_connection *mc, const int mode)
 
static void in_extra_dispatch (struct management *man)
 
static void man_pk_sig (struct management *man, const char *cmd_name)
 
static void man_certificate (struct management *man)
 
static void man_load_stats (struct management *man)
 
static bool man_need (struct management *man, const char **p, const int n, unsigned int flags)
 
static void man_proxy (struct management *man, const char **p)
 
static void man_remote (struct management *man, const char **p)
 
static void set_client_version (struct management *man, const char *version)
 
static void man_dispatch_command (struct management *man, struct status_output *so, const char **p, const int nparms)
 
static void man_start_ne32 (struct management *man)
 
static void man_stop_ne32 (struct management *man)
 
static void man_record_peer_info (struct management *man)
 
static void man_connection_settings_reset (struct management *man)
 
static void man_new_connection_post (struct management *man, const char *description)
 
static void man_accept (struct management *man)
 
static void man_listen (struct management *man)
 
static void man_connect (struct management *man)
 
static void man_process_command (struct management *man, const char *line)
 
static bool man_io_error (struct management *man, const char *prefix)
 
static int man_read (struct management *man)
 
static int man_write (struct management *man)
 
static void man_connection_clear (struct man_connection *mc)
 
static void man_persist_init (struct management *man, const int log_history_cache, const int echo_buffer_size, const int state_buffer_size)
 
static void man_persist_close (struct man_persist *mp)
 
static void man_settings_init (struct man_settings *ms, const char *addr, const char *port, const char *pass_file, const char *client_user, const char *client_group, const int log_history_cache, const int echo_buffer_size, const int state_buffer_size, const char *write_peer_info_file, const int remap_sigusr1, const unsigned int flags)
 
static void man_settings_close (struct man_settings *ms)
 
static void man_connection_init (struct management *man)
 
static void man_connection_close (struct management *man)
 
struct managementmanagement_init (void)
 
bool management_open (struct management *man, const char *addr, const char *port, const char *pass_file, const char *client_user, const char *client_group, const int log_history_cache, const int echo_buffer_size, const int state_buffer_size, const char *write_peer_info_file, const int remap_sigusr1, const unsigned int flags)
 
void management_close (struct management *man)
 
void management_set_callback (struct management *man, const struct management_callback *cb)
 
void management_clear_callback (struct management *man)
 
void management_set_state (struct management *man, const int state, const char *detail, const in_addr_t *tun_local_ip, const struct in6_addr *tun_local_ip6, const struct openvpn_sockaddr *local, const struct openvpn_sockaddr *remote)
 
static bool env_filter_match (const char *env_str, const int env_filter_level)
 
static void man_output_env (const struct env_set *es, const bool tail, const int env_filter_level, const char *prefix)
 
static void man_output_extra_env (struct management *man, const char *prefix)
 
void management_up_down (struct management *man, const char *updown, const struct env_set *es)
 
void management_notify (struct management *man, const char *severity, const char *type, const char *text)
 
void management_notify_generic (struct management *man, const char *str)
 
void management_echo (struct management *man, const char *string, const bool pull)
 
void management_post_tunnel_open (struct management *man, const in_addr_t tun_local_ip)
 
void management_pre_tunnel_close (struct management *man)
 
void management_auth_failure (struct management *man, const char *type, const char *reason)
 
void management_auth_token (struct management *man, const char *token)
 
static bool man_persist_state (unsigned int *persistent, const int n)
 
void management_socket_set (struct management *man, struct event_set *es, void *arg, unsigned int *persistent)
 
void management_io (struct management *man)
 
static bool man_standalone_ok (const struct management *man)
 
static bool man_check_for_signals (volatile int *signal_received)
 
static int man_block (struct management *man, volatile int *signal_received, const time_t expire)
 
static int man_standalone_event_loop (struct management *man, volatile int *signal_received, const time_t expire)
 
static void man_wait_for_client_connection (struct management *man, volatile int *signal_received, const time_t expire, unsigned int flags)
 
void management_event_loop_n_seconds (struct management *man, int sec)
 
bool management_query_user_pass (struct management *man, struct user_pass *up, const char *type, const unsigned int flags, const char *static_challenge)
 
static int management_query_multiline (struct management *man, const char *b64_data, const char *prompt, const char *cmd, int *state, struct buffer_list **input)
 
static char * management_query_multiline_flatten_newline (struct management *man, const char *b64_data, const char *prompt, const char *cmd, int *state, struct buffer_list **input)
 
static char * management_query_multiline_flatten (struct management *man, const char *b64_data, const char *prompt, const char *cmd, int *state, struct buffer_list **input)
 
char * management_query_pk_sig (struct management *man, const char *b64_data)
 
char * management_query_cert (struct management *man, const char *cert_name)
 
bool management_would_hold (struct management *man)
 
bool management_should_daemonize (struct management *man)
 
bool management_hold (struct management *man, int holdtime)
 
struct command_linecommand_line_new (const int buf_len)
 
void command_line_reset (struct command_line *cl)
 
void command_line_free (struct command_line *cl)
 
void command_line_add (struct command_line *cl, const unsigned char *buf, const int len)
 
const char * command_line_get (struct command_line *cl)
 
void command_line_next (struct command_line *cl)
 
const char * log_entry_print (const struct log_entry *e, unsigned int flags, struct gc_arena *gc)
 
static void log_entry_free_contents (struct log_entry *e)
 
static int log_index (const struct log_history *h, int i)
 
static void log_history_obj_init (struct log_history *h, int capacity)
 
struct log_historylog_history_init (const int capacity)
 
static void log_history_free_contents (struct log_history *h)
 
void log_history_close (struct log_history *h)
 
void log_history_add (struct log_history *h, const struct log_entry *le)
 
void log_history_resize (struct log_history *h, const int capacity)
 
const struct log_entrylog_history_ref (const struct log_history *h, const int index)
 
void management_sleep (const int n)
 A sleep function that services the management layer for n seconds rather than doing nothing. More...
 

Variables

static const char blank_up [] = "[[BLANK]]"
 
struct managementmanagement
 

Macro Definition Documentation

◆ AF_DID_PUSH

#define AF_DID_PUSH   (1<<0)

◆ AF_DID_RESET

#define AF_DID_RESET   (1<<1)

◆ IER_NEW

#define IER_NEW   1

Definition at line 849 of file manage.c.

Referenced by in_extra_dispatch(), in_extra_reset(), man_certificate(), and man_pk_sig().

◆ IER_RESET

#define IER_RESET   0

◆ MANAGEMENT_ECHO_FLAGS

#define MANAGEMENT_ECHO_FLAGS   0

Definition at line 57 of file manage.c.

Referenced by man_echo(), and management_echo().

◆ MANAGEMENT_ECHO_PULL_INFO

#define MANAGEMENT_ECHO_PULL_INFO   0

Definition at line 52 of file manage.c.

◆ MN_AT_LEAST

#define MN_AT_LEAST   (1<<0)

Definition at line 1146 of file manage.c.

Referenced by man_dispatch_command(), and man_need().

◆ MWCC_HOLD_WAIT

#define MWCC_HOLD_WAIT   (1<<1)

Definition at line 3282 of file manage.c.

Referenced by man_wait_for_client_connection(), and management_hold().

◆ MWCC_OTHER_WAIT

#define MWCC_OTHER_WAIT   (1<<2)

Definition at line 3283 of file manage.c.

Referenced by man_wait_for_client_connection(), and management_query_multiline().

◆ MWCC_PASSWORD_WAIT

#define MWCC_PASSWORD_WAIT   (1<<0)

Definition at line 3281 of file manage.c.

Referenced by man_wait_for_client_connection(), and management_query_user_pass().

Function Documentation

◆ command_line_add()

void command_line_add ( struct command_line cl,
const unsigned char *  buf,
const int  len 
)

Definition at line 3774 of file manage.c.

References command_line::buf, buf_clear(), buf_write_u8(), CC_NEWLINE, CC_PRINT, and char_class().

Referenced by man_read().

◆ command_line_free()

void command_line_free ( struct command_line cl)

Definition at line 3765 of file manage.c.

References command_line::buf, command_line_reset(), free, free_buf(), and command_line::residual.

Referenced by man_connection_close().

◆ command_line_get()

const char* command_line_get ( struct command_line cl)

◆ command_line_new()

struct command_line* command_line_new ( const int  buf_len)

Definition at line 3748 of file manage.c.

References alloc_buf(), ALLOC_OBJ_CLEAR, command_line::buf, and command_line::residual.

Referenced by man_connection_init().

◆ command_line_next()

void command_line_next ( struct command_line cl)

Definition at line 3806 of file manage.c.

References command_line::buf, buf_clear(), buf_copy(), and command_line::residual.

Referenced by man_read().

◆ command_line_reset()

void command_line_reset ( struct command_line cl)

Definition at line 3758 of file manage.c.

References command_line::buf, buf_clear(), and command_line::residual.

Referenced by command_line_free(), and man_reset_client_socket().

◆ env_filter_match()

static bool env_filter_match ( const char *  env_str,
const int  env_filter_level 
)
static

Definition at line 2722 of file manage.c.

References SIZE.

Referenced by man_output_env().

◆ in_extra_dispatch()

static void in_extra_dispatch ( struct management man)
static

◆ in_extra_reset()

static void in_extra_reset ( struct man_connection mc,
const int  mode 
)
static

◆ log_entry_free_contents()

static void log_entry_free_contents ( struct log_entry e)
static

Definition at line 3884 of file manage.c.

References CLEAR, free, and log_entry::string.

Referenced by log_history_add(), and log_history_free_contents().

◆ log_entry_print()

const char* log_entry_print ( const struct log_entry e,
unsigned int  flags,
struct gc_arena gc 
)

◆ log_history_add()

void log_history_add ( struct log_history h,
const struct log_entry le 
)

◆ log_history_close()

void log_history_close ( struct log_history h)

Definition at line 3933 of file manage.c.

References free, and log_history_free_contents().

Referenced by man_persist_close().

◆ log_history_free_contents()

static void log_history_free_contents ( struct log_history h)
static

◆ log_history_init()

struct log_history* log_history_init ( const int  capacity)

Definition at line 3912 of file manage.c.

References ALLOC_OBJ, ASSERT, and log_history_obj_init().

Referenced by man_persist_init().

◆ log_history_obj_init()

static void log_history_obj_init ( struct log_history h,
int  capacity 
)
static

◆ log_history_ref()

const struct log_entry* log_history_ref ( const struct log_history h,
const int  index 
)

Definition at line 3982 of file manage.c.

References log_history::array, log_index(), and log_history::size.

Referenced by man_history().

◆ log_history_resize()

void log_history_resize ( struct log_history h,
const int  capacity 
)

◆ log_index()

static int log_index ( const struct log_history h,
int  i 
)
inlinestatic

◆ man_accept()

static void man_accept ( struct management man)
static

◆ man_block()

static int man_block ( struct management man,
volatile int *  signal_received,
const time_t  expire 
)
static

◆ man_bytecount()

static void man_bytecount ( struct management man,
const int  update_seconds 
)
static

◆ man_bytecount_output_client()

void man_bytecount_output_client ( struct management man)

◆ man_certificate()

static void man_certificate ( struct management man)
static

◆ man_check_for_signals()

static bool man_check_for_signals ( volatile int *  signal_received)
static

◆ man_check_password()

static void man_check_password ( struct management man,
const char *  line 
)
static

◆ man_close_socket()

static void man_close_socket ( struct management man,
const socket_descriptor_t  sd 
)
static

◆ man_connect()

static void man_connect ( struct management man)
static

◆ man_connection_clear()

static void man_connection_clear ( struct man_connection mc)
static

◆ man_connection_close()

static void man_connection_close ( struct management man)
static

◆ man_connection_init()

static void man_connection_init ( struct management man)
static

◆ man_connection_settings_reset()

static void man_connection_settings_reset ( struct management man)
static

◆ man_delete_unix_socket()

static void man_delete_unix_socket ( struct management man)
static

◆ man_dispatch_command()

static void man_dispatch_command ( struct management man,
struct status_output so,
const char **  p,
const int  nparms 
)
static

◆ man_echo()

static void man_echo ( struct management man,
const char *  parm 
)
static

◆ man_forget_passwords()

static void man_forget_passwords ( struct management man)
static

Definition at line 763 of file manage.c.

References M_CLIENT, msg, and ssl_purge_auth().

Referenced by man_dispatch_command().

◆ man_help()

static void man_help ( void  )
static

Definition at line 71 of file manage.c.

References M_CLIENT, msg, and title_string.

Referenced by man_dispatch_command().

◆ man_history()

static void man_history ( struct management man,
const char *  parm,
const char *  type,
struct log_history log,
bool realtime,
const unsigned int  lep_flags 
)
static

◆ man_hold()

static void man_hold ( struct management man,
const char *  cmd 
)
static

◆ man_io_error()

static bool man_io_error ( struct management man,
const char *  prefix 
)
static

◆ man_kill()

static void man_kill ( struct management man,
const char *  victim 
)
static

◆ man_listen()

static void man_listen ( struct management man)
static

◆ man_load_stats()

static void man_load_stats ( struct management man)
static

◆ man_log()

static void man_log ( struct management man,
const char *  parm 
)
static

◆ man_mod_signal()

static int man_mod_signal ( const struct management man,
const int  signum 
)
static

◆ man_need()

static bool man_need ( struct management man,
const char **  p,
const int  n,
unsigned int  flags 
)
static

Definition at line 1149 of file manage.c.

References ASSERT, M_CLIENT, MN_AT_LEAST, and msg.

Referenced by man_dispatch_command().

◆ man_net()

static void man_net ( struct management man)
static

◆ man_new_connection_post()

static void man_new_connection_post ( struct management man,
const char *  description 
)
static

◆ man_output_env()

static void man_output_env ( const struct env_set es,
const bool  tail,
const int  env_filter_level,
const char *  prefix 
)
static

◆ man_output_extra_env()

static void man_output_extra_env ( struct management man,
const char *  prefix 
)
static

◆ man_output_list_push()

static void man_output_list_push ( struct management man,
const char *  str 
)
static

◆ man_output_list_push_finalize()

static void man_output_list_push_finalize ( struct management man)
static

◆ man_output_list_push_str()

static void man_output_list_push_str ( struct management man,
const char *  str 
)
static

◆ man_output_standalone()

static void man_output_standalone ( struct management man,
volatile int *  signal_received 
)
static

◆ man_password_needed()

static bool man_password_needed ( struct management man)
inlinestatic

◆ man_persist_close()

static void man_persist_close ( struct man_persist mp)
static

◆ man_persist_init()

static void man_persist_init ( struct management man,
const int  log_history_cache,
const int  echo_buffer_size,
const int  state_buffer_size 
)
static

◆ man_persist_state()

static bool man_persist_state ( unsigned int *  persistent,
const int  n 
)
inlinestatic

Definition at line 3002 of file manage.c.

Referenced by management_io(), and management_socket_set().

◆ man_pk_sig()

static void man_pk_sig ( struct management man,
const char *  cmd_name 
)
static

◆ man_process_command()

static void man_process_command ( struct management man,
const char *  line 
)
static

◆ man_prompt()

static void man_prompt ( struct management man)
static

Definition at line 265 of file manage.c.

References man_output_list_push(), and man_password_needed().

Referenced by man_new_connection_post(), and man_read().

◆ man_proxy()

static void man_proxy ( struct management man,
const char **  p 
)
static

◆ man_query_need_ok()

static void man_query_need_ok ( struct management man,
const char *  type,
const char *  action 
)
static

◆ man_query_need_str()

static void man_query_need_str ( struct management man,
const char *  type,
const char *  action 
)
static

◆ man_query_password()

static void man_query_password ( struct management man,
const char *  type,
const char *  string 
)
static

◆ man_query_user_pass()

static void man_query_user_pass ( struct management man,
const char *  type,
const char *  string,
const bool  needed,
const char *  prompt,
char *  dest,
int  len 
)
static

◆ man_query_username()

static void man_query_username ( struct management man,
const char *  type,
const char *  string 
)
static

◆ man_read()

static int man_read ( struct management man)
static

◆ man_record_peer_info()

static void man_record_peer_info ( struct management man)
static

◆ man_remote()

static void man_remote ( struct management man,
const char **  p 
)
static

◆ man_reset_client_socket()

static void man_reset_client_socket ( struct management man,
const bool  exiting 
)
static

◆ man_settings_close()

static void man_settings_close ( struct man_settings ms)
static

Definition at line 2472 of file manage.c.

References CLEAR, free, man_settings::local, and man_settings::write_peer_info_file.

Referenced by management_close().

◆ man_settings_init()

static void man_settings_init ( struct man_settings ms,
const char *  addr,
const char *  port,
const char *  pass_file,
const char *  client_user,
const char *  client_group,
const int  log_history_cache,
const int  echo_buffer_size,
const int  state_buffer_size,
const char *  write_peer_info_file,
const int  remap_sigusr1,
const unsigned int  flags 
)
static

◆ man_signal()

static void man_signal ( struct management man,
const char *  name 
)
static

◆ man_standalone_event_loop()

static int man_standalone_event_loop ( struct management man,
volatile int *  signal_received,
const time_t  expire 
)
static

◆ man_standalone_ok()

static bool man_standalone_ok ( const struct management man)
inlinestatic

◆ man_start_ne32()

static void man_start_ne32 ( struct management man)
static

◆ man_state()

static void man_state ( struct management man,
const char *  parm 
)
static

◆ man_state_name()

static const char* man_state_name ( const int  state)
static

◆ man_status()

static void man_status ( struct management man,
const int  version,
struct status_output so 
)
static

◆ man_stop_ne32()

static void man_stop_ne32 ( struct management man)
static

◆ man_up_finalize()

static void man_up_finalize ( struct management man)
static

◆ man_update_io_state()

static void man_update_io_state ( struct management man)
static

◆ man_wait_for_client_connection()

static void man_wait_for_client_connection ( struct management man,
volatile int *  signal_received,
const time_t  expire,
unsigned int  flags 
)
static

◆ man_welcome()

static void man_welcome ( struct management man)
static

◆ man_write()

static int man_write ( struct management man)
static

◆ management_auth_failure()

void management_auth_failure ( struct management man,
const char *  type,
const char *  reason 
)

Definition at line 2983 of file manage.c.

References M_CLIENT, and msg.

Referenced by get_user_pass_cr(), receive_auth_failed(), tls_ctx_load_pkcs12(), and tls_ctx_load_priv_file().

◆ management_auth_token()

void management_auth_token ( struct management man,
const char *  token 
)

Definition at line 2996 of file manage.c.

References M_CLIENT, and msg.

Referenced by add_option().

◆ management_clear_callback()

void management_clear_callback ( struct management man)

◆ management_close()

void management_close ( struct management man)

◆ management_echo()

void management_echo ( struct management man,
const char *  string,
const bool  pull 
)

◆ management_event_loop_n_seconds()

void management_event_loop_n_seconds ( struct management man,
int  sec 
)

◆ management_hold()

bool management_hold ( struct management man,
int  holdtime 
)

◆ management_init()

struct management* management_init ( void  )

◆ management_io()

void management_io ( struct management man)

◆ management_notify()

void management_notify ( struct management man,
const char *  severity,
const char *  type,
const char *  text 
)

Definition at line 2812 of file manage.c.

References M_CLIENT, and msg.

Referenced by server_pushed_signal().

◆ management_notify_generic()

void management_notify_generic ( struct management man,
const char *  str 
)

◆ management_open()

bool management_open ( struct management man,
const char *  addr,
const char *  port,
const char *  pass_file,
const char *  client_user,
const char *  client_group,
const int  log_history_cache,
const int  echo_buffer_size,
const int  state_buffer_size,
const char *  write_peer_info_file,
const int  remap_sigusr1,
const unsigned int  flags 
)

◆ management_post_tunnel_open()

void management_post_tunnel_open ( struct management man,
const in_addr_t  tun_local_ip 
)

◆ management_pre_tunnel_close()

void management_pre_tunnel_close ( struct management man)

◆ management_query_cert()

char* management_query_cert ( struct management man,
const char *  cert_name 
)

◆ management_query_multiline()

static int management_query_multiline ( struct management man,
const char *  b64_data,
const char *  prompt,
const char *  cmd,
int *  state,
struct buffer_list **  input 
)
static

◆ management_query_multiline_flatten()

static char* management_query_multiline_flatten ( struct management man,
const char *  b64_data,
const char *  prompt,
const char *  cmd,
int *  state,
struct buffer_list **  input 
)
static

◆ management_query_multiline_flatten_newline()

static char* management_query_multiline_flatten_newline ( struct management man,
const char *  b64_data,
const char *  prompt,
const char *  cmd,
int *  state,
struct buffer_list **  input 
)
static

◆ management_query_pk_sig()

char* management_query_pk_sig ( struct management man,
const char *  b64_data 
)

◆ management_query_user_pass()

bool management_query_user_pass ( struct management man,
struct user_pass up,
const char *  type,
const unsigned int  flags,
const char *  static_challenge 
)

◆ management_set_callback()

void management_set_callback ( struct management man,
const struct management_callback cb 
)

◆ management_set_state()

void management_set_state ( struct management man,
const int  state,
const char *  detail,
const in_addr_t tun_local_ip,
const struct in6_addr *  tun_local_ip6,
const struct openvpn_sockaddr local,
const struct openvpn_sockaddr remote 
)

◆ management_should_daemonize()

bool management_should_daemonize ( struct management man)

◆ management_sleep()

void management_sleep ( const int  n)

A sleep function that services the management layer for n seconds rather than doing nothing.

Definition at line 3995 of file manage.c.

References management_event_loop_n_seconds(), management_sleep(), and sleep.

Referenced by do_up(), management_bytes_in(), management_sleep(), netsh_command(), open_null(), open_tun(), openvpn_connect(), openvpn_getaddrinfo(), read_incoming_link(), socket_listen_accept(), and socket_restart_pause().

◆ management_socket_set()

void management_socket_set ( struct management man,
struct event_set es,
void *  arg,
unsigned int *  persistent 
)

◆ management_up_down()

void management_up_down ( struct management man,
const char *  updown,
const struct env_set es 
)

Definition at line 2802 of file manage.c.

References man_settings::flags, M_CLIENT, man_output_env(), MF_UP_DOWN, msg, and management::settings.

Referenced by do_close_tun(), and do_route().

◆ management_would_hold()

bool management_would_hold ( struct management man)

◆ set_client_version()

static void set_client_version ( struct management man,
const char *  version 
)
static

Definition at line 1234 of file manage.c.

References man_connection::client_version, and management::connection.

Referenced by man_dispatch_command().

◆ virtual_output_callback_func()

static void virtual_output_callback_func ( void *  arg,
const unsigned int  flags,
const char *  str 
)
static

Variable Documentation

◆ blank_up

const char blank_up[] = "[[BLANK]]"
static

Definition at line 61 of file manage.c.

Referenced by man_query_password(), and management_query_user_pass().

◆ management

Definition at line 63 of file manage.c.