OpenVPN
manage.h
Go to the documentation of this file.
1 /*
2  * OpenVPN -- An application to securely tunnel IP networks
3  * over a single TCP/UDP port, with support for SSL/TLS-based
4  * session authentication and key exchange,
5  * packet encryption, packet authentication, and
6  * packet compression.
7  *
8  * Copyright (C) 2002-2018 OpenVPN Inc <sales@openvpn.net>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2
12  * as published by the Free Software Foundation.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program; if not, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23 
24 #ifndef MANAGE_H
25 #define MANAGE_H
26 
27 #ifdef ENABLE_MANAGEMENT
28 
29 #include "misc.h"
30 #include "event.h"
31 #include "socket.h"
32 #include "mroute.h"
33 
34 #define MANAGEMENT_VERSION 2
35 #define MANAGEMENT_N_PASSWORD_RETRIES 3
36 #define MANAGEMENT_LOG_HISTORY_INITIAL_SIZE 100
37 #define MANAGEMENT_ECHO_BUFFER_SIZE 100
38 #define MANAGEMENT_STATE_BUFFER_SIZE 100
39 
40 /*
41  * Management-interface-based deferred authentication
42  */
43 #ifdef MANAGEMENT_DEF_AUTH
44 struct man_def_auth_context {
45  unsigned long cid;
46 
47 #define DAF_CONNECTION_ESTABLISHED (1<<0)
48 #define DAF_CONNECTION_CLOSED (1<<1)
49 #define DAF_INITIAL_AUTH (1<<2)
50  unsigned int flags;
51 
52  unsigned int mda_key_id_counter;
53 
54  time_t bytecount_last_update;
55 };
56 #endif
57 
58 /*
59  * Manage build-up of command line
60  */
62 {
63  struct buffer buf;
64  struct buffer residual;
65 };
66 
67 struct command_line *command_line_new(const int buf_len);
68 
69 void command_line_free(struct command_line *cl);
70 
71 void command_line_add(struct command_line *cl, const unsigned char *buf, const int len);
72 
73 const char *command_line_get(struct command_line *cl);
74 
75 void command_line_reset(struct command_line *cl);
76 
77 void command_line_next(struct command_line *cl);
78 
79 /*
80  * Manage log file history
81  */
82 
84  unsigned int msg_flags;
85  int state;
86  int intval;
87 };
88 
89 struct log_entry
90 {
91  time_t timestamp;
92  const char *string;
94  struct in6_addr local_ip6;
95  struct openvpn_sockaddr local_sock;
96  struct openvpn_sockaddr remote_sock;
97  union log_entry_union u;
98 };
99 
100 #define LOG_PRINT_LOG_PREFIX (1<<0)
101 #define LOG_PRINT_ECHO_PREFIX (1<<1)
102 #define LOG_PRINT_STATE_PREFIX (1<<2)
103 
104 #define LOG_PRINT_INT_DATE (1<<3)
105 #define LOG_PRINT_MSG_FLAGS (1<<4)
106 #define LOG_PRINT_STATE (1<<5)
107 #define LOG_PRINT_LOCAL_IP (1<<6)
108 
109 #define LOG_PRINT_CRLF (1<<7)
110 #define LOG_FATAL_NOTIFY (1<<8)
111 
112 #define LOG_PRINT_INTVAL (1<<9)
113 
114 #define LOG_PRINT_REMOTE_IP (1<<10)
115 
116 #define LOG_ECHO_TO_LOG (1<<11)
117 
118 const char *log_entry_print(const struct log_entry *e, unsigned int flags, struct gc_arena *gc);
119 
121 {
122  int base;
123  int size;
124  int capacity;
125  struct log_entry *array;
126 };
127 
128 struct log_history *log_history_init(const int capacity);
129 
130 void log_history_close(struct log_history *h);
131 
132 void log_history_add(struct log_history *h, const struct log_entry *le);
133 
134 void log_history_resize(struct log_history *h, const int capacity);
135 
136 const struct log_entry *log_history_ref(const struct log_history *h, const int index);
137 
138 static inline int
140 {
141  return h->size;
142 }
143 
144 static inline int
146 {
147  return h->capacity;
148 }
149 
150 /*
151  * Callbacks for 'status' and 'kill' commands.
152  * Also for management-based deferred authentication and packet filter.
153  */
155 {
156  void *arg;
157 
158 #define MCF_SERVER (1<<0) /* is OpenVPN being run as a server? */
159  unsigned int flags;
160 
161  void (*status) (void *arg, const int version, struct status_output *so);
162  void (*show_net) (void *arg, const int msglevel);
163  int (*kill_by_cn) (void *arg, const char *common_name);
164  int (*kill_by_addr) (void *arg, const in_addr_t addr, const int port);
165  void (*delete_event) (void *arg, event_t event);
166  int (*n_clients) (void *arg);
167 #ifdef MANAGEMENT_DEF_AUTH
168  bool (*kill_by_cid)(void *arg, const unsigned long cid, const char *kill_msg);
169  bool (*client_auth) (void *arg,
170  const unsigned long cid,
171  const unsigned int mda_key_id,
172  const bool auth,
173  const char *reason,
174  const char *client_reason,
175  struct buffer_list *cc_config); /* ownership transferred */
176  char *(*get_peer_info) (void *arg, const unsigned long cid);
177 #endif
178 #ifdef MANAGEMENT_PF
179  bool (*client_pf)(void *arg,
180  const unsigned long cid,
181  struct buffer_list *pf_config); /* ownership transferred */
182 #endif
183  bool (*proxy_cmd)(void *arg, const char **p);
184  bool (*remote_cmd) (void *arg, const char **p);
185 #ifdef TARGET_ANDROID
186  int (*network_change)(void *arg, bool samenetwork);
187 #endif
188 };
189 
190 /*
191  * Management object, split into three components:
192  *
193  * struct man_persist : Data elements which are persistent across
194  * man_connection open and close.
195  *
196  * struct man_settings : management parameters.
197  *
198  * struct man_connection : created on socket binding and listen,
199  * deleted on socket unbind, may
200  * handle multiple sequential client
201  * connections.
202  */
203 
204 struct man_persist {
205  bool defined;
206 
207  struct log_history *log;
208  struct virtual_output vout;
209 
211  struct management_callback callback;
212 
213  struct log_history *echo; /* saved --echo strings */
215 
217 
218  const char *special_state_msg;
219 
222 };
223 
224 struct man_settings {
225  bool defined;
226  unsigned int flags; /* MF_x flags */
227  struct addrinfo *local;
228 #if UNIX_SOCK_SUPPORT
229  struct sockaddr_un local_unix;
230 #endif
232  struct user_pass up;
239 
240 /* flags for handling the management interface "signal" command */
241 #define MANSIG_IGNORE_USR1_HUP (1<<0)
242 #define MANSIG_MAP_USR1_TO_HUP (1<<1)
243 #define MANSIG_MAP_USR1_TO_TERM (1<<2)
244  unsigned int mansig;
245 };
246 
247 /* up_query modes */
248 #define UP_QUERY_DISABLED 0
249 #define UP_QUERY_USER_PASS 1
250 #define UP_QUERY_PASS 2
251 #define UP_QUERY_NEED_OK 3
252 #define UP_QUERY_NEED_STR 4
253 
254 /* states */
255 #define MS_INITIAL 0 /* all sockets are closed */
256 #define MS_LISTEN 1 /* no client is connected */
257 #define MS_CC_WAIT_READ 2 /* client is connected, waiting for read on socket */
258 #define MS_CC_WAIT_WRITE 3 /* client is connected, waiting for ability to write to socket */
259 
261  int state;
262 
265  struct openvpn_sockaddr remote;
266 
267 #ifdef _WIN32
268  struct net_event_win32 ne32;
269 #endif
270 
271  bool halt;
274 
275  struct command_line *in;
276  struct buffer_list *out;
277 
278 #define IEC_UNDEF 0
279 #define IEC_CLIENT_AUTH 1
280 #define IEC_CLIENT_PF 2
281 #define IEC_RSA_SIGN 3
282 #define IEC_CERTIFICATE 4
283 #define IEC_PK_SIGN 5
286 #ifdef MANAGEMENT_DEF_AUTH
287  unsigned long in_extra_cid;
288  unsigned int in_extra_kid;
289 #endif
290 #define EKS_UNDEF 0
291 #define EKS_SOLICIT 1
292 #define EKS_INPUT 2
293 #define EKS_READY 3
298  struct event_set *es;
300 
306 
307  const char *up_query_type;
309  struct user_pass up_query;
310 
311 #ifdef TARGET_ANDROID
312  int fdtosend;
313  int lastfdreceived;
314 #endif
316 };
317 
319 {
320  struct man_persist persist;
322  struct man_connection connection;
323 };
324 
325 extern struct management *management;
326 
327 struct user_pass;
328 
329 struct management *management_init(void);
330 
331 /* management_open flags */
332 #define MF_SERVER (1<<0)
333 #define MF_QUERY_PASSWORDS (1<<1)
334 #define MF_HOLD (1<<2)
335 #define MF_SIGNAL (1<<3)
336 #define MF_FORGET_DISCONNECT (1<<4)
337 #define MF_CONNECT_AS_CLIENT (1<<5)
338 #ifdef MANAGEMENT_DEF_AUTH
339 #define MF_CLIENT_AUTH (1<<6)
340 #endif
341 #ifdef MANAGEMENT_PF
342 #define MF_CLIENT_PF (1<<7)
343 #endif
344 #define MF_UNIX_SOCK (1<<8)
345 #define MF_EXTERNAL_KEY (1<<9)
346 #define MF_UP_DOWN (1<<10)
347 #define MF_QUERY_REMOTE (1<<11)
348 #define MF_QUERY_PROXY (1<<12)
349 #define MF_EXTERNAL_CERT (1<<13)
350 
351 bool management_open(struct management *man,
352  const char *addr,
353  const char *port,
354  const char *pass_file,
355  const char *client_user,
356  const char *client_group,
357  const int log_history_cache,
358  const int echo_buffer_size,
359  const int state_buffer_size,
360  const char *write_peer_info_file,
361  const int remap_sigusr1,
362  const unsigned int flags);
363 
364 void management_close(struct management *man);
365 
366 void management_post_tunnel_open(struct management *man, const in_addr_t tun_local_ip);
367 
368 void management_pre_tunnel_close(struct management *man);
369 
370 void management_socket_set(struct management *man,
371  struct event_set *es,
372  void *arg,
373  unsigned int *persistent);
374 
375 void management_io(struct management *man);
376 
377 void management_set_callback(struct management *man,
378  const struct management_callback *cb);
379 
380 void management_clear_callback(struct management *man);
381 
382 bool management_query_user_pass(struct management *man,
383  struct user_pass *up,
384  const char *type,
385  const unsigned int flags,
386  const char *static_challenge);
387 
388 #ifdef TARGET_ANDROID
389 bool management_android_control(struct management *man, const char *command, const char *msg);
390 
391 #define ANDROID_KEEP_OLD_TUN 1
392 #define ANDROID_OPEN_AFTER_CLOSE 2
393 #define ANDROID_OPEN_BEFORE_CLOSE 3
394 int managment_android_persisttun_action(struct management *man);
395 
396 #endif
397 
398 bool management_should_daemonize(struct management *man);
399 
400 bool management_would_hold(struct management *man);
401 
402 bool management_hold(struct management *man, int holdtime);
403 
404 void management_event_loop_n_seconds(struct management *man, int sec);
405 
406 void management_up_down(struct management *man, const char *updown, const struct env_set *es);
407 
408 void management_notify(struct management *man, const char *severity, const char *type, const char *text);
409 
410 void management_notify_generic(struct management *man, const char *str);
411 
412 #ifdef MANAGEMENT_DEF_AUTH
413 void management_notify_client_needing_auth(struct management *management,
414  const unsigned int auth_id,
415  struct man_def_auth_context *mdac,
416  const struct env_set *es);
417 
418 void management_connection_established(struct management *management,
419  struct man_def_auth_context *mdac,
420  const struct env_set *es);
421 
422 void management_notify_client_close(struct management *management,
423  struct man_def_auth_context *mdac,
424  const struct env_set *es);
425 
426 void management_learn_addr(struct management *management,
427  struct man_def_auth_context *mdac,
428  const struct mroute_addr *addr,
429  const bool primary);
430 
431 #endif
432 
433 char *management_query_pk_sig(struct management *man, const char *b64_data);
434 
435 char *management_query_cert(struct management *man, const char *cert_name);
436 
437 static inline bool
438 management_connected(const struct management *man)
439 {
441 }
442 
443 static inline bool
444 management_query_user_pass_enabled(const struct management *man)
445 {
447 }
448 
449 static inline bool
450 management_query_remote_enabled(const struct management *man)
451 {
452  return BOOL_CAST(man->settings.flags & MF_QUERY_REMOTE);
453 }
454 
455 static inline bool
456 management_query_proxy_enabled(const struct management *man)
457 {
458  return BOOL_CAST(man->settings.flags & MF_QUERY_PROXY);
459 }
460 
461 #ifdef MANAGEMENT_PF
462 static inline bool
463 management_enable_pf(const struct management *man)
464 {
465  return man && BOOL_CAST(man->settings.flags & MF_CLIENT_PF);
466 }
467 #endif
468 
469 #ifdef MANAGEMENT_DEF_AUTH
470 static inline bool
471 management_enable_def_auth(const struct management *man)
472 {
473  return man && BOOL_CAST(man->settings.flags & MF_CLIENT_AUTH);
474 }
475 #endif
476 
477 /*
478  * OpenVPN tells the management layer what state it's in
479  */
480 
481 /* client/server states */
482 #define OPENVPN_STATE_INITIAL 0 /* Initial, undefined state */
483 #define OPENVPN_STATE_CONNECTING 1 /* Management interface has been initialized */
484 #define OPENVPN_STATE_ASSIGN_IP 2 /* Assigning IP address to virtual network interface */
485 #define OPENVPN_STATE_ADD_ROUTES 3 /* Adding routes to system */
486 #define OPENVPN_STATE_CONNECTED 4 /* Initialization sequence completed */
487 #define OPENVPN_STATE_RECONNECTING 5 /* Restart */
488 #define OPENVPN_STATE_EXITING 6 /* Exit */
489 
490 /* client-only states */
491 #define OPENVPN_STATE_WAIT 7 /* Waiting for initial response from server */
492 #define OPENVPN_STATE_AUTH 8 /* Authenticating with server */
493 #define OPENVPN_STATE_GET_CONFIG 9 /* Downloading configuration from server */
494 #define OPENVPN_STATE_RESOLVE 10 /* DNS lookup */
495 #define OPENVPN_STATE_TCP_CONNECT 11 /* Connecting to TCP server */
496 
497 #define OPENVPN_STATE_CLIENT_BASE 7 /* Base index of client-only states */
498 
499 void management_set_state(struct management *man,
500  const int state,
501  const char *detail,
502  const in_addr_t *tun_local_ip,
503  const struct in6_addr *tun_local_ip6,
504  const struct openvpn_sockaddr *local_addr,
505  const struct openvpn_sockaddr *remote_addr);
506 
507 /*
508  * The management object keeps track of OpenVPN --echo
509  * parameters.
510  */
511 void management_echo(struct management *man, const char *string, const bool pull);
512 
513 /*
514  * OpenVPN calls here to indicate a password failure
515  */
516 
517 void management_auth_failure(struct management *man, const char *type, const char *reason);
518 
519 /*
520  * Echo an authentication token to management interface
521  */
522 void management_auth_token(struct management *man, const char *token);
523 
524 /*
525  * These functions drive the bytecount in/out counters.
526  */
527 
528 void man_bytecount_output_client(struct management *man);
529 
530 static inline void
532 {
536  {
538  }
539 }
540 
541 static inline void
542 management_bytes_out_client(struct management *man, const int size)
543 {
544  man->persist.bytes_out += size;
546 }
547 
548 static inline void
549 management_bytes_in_client(struct management *man, const int size)
550 {
551  man->persist.bytes_in += size;
553 }
554 
555 static inline void
556 management_bytes_out(struct management *man, const int size)
557 {
558  if (!(man->persist.callback.flags & MCF_SERVER))
559  {
560  management_bytes_out_client(man, size);
561  }
562 }
563 
564 static inline void
565 management_bytes_in(struct management *man, const int size)
566 {
567  if (!(man->persist.callback.flags & MCF_SERVER))
568  {
569  management_bytes_in_client(man, size);
570  }
571 }
572 
573 #ifdef MANAGEMENT_DEF_AUTH
574 
575 void man_bytecount_output_server(struct management *man,
576  const counter_type *bytes_in_total,
577  const counter_type *bytes_out_total,
578  struct man_def_auth_context *mdac);
579 
580 static inline void
581 management_bytes_server(struct management *man,
582  const counter_type *bytes_in_total,
583  const counter_type *bytes_out_total,
584  struct man_def_auth_context *mdac)
585 {
587  && now >= mdac->bytecount_last_update + man->connection.bytecount_update_seconds
588  && (mdac->flags & (DAF_CONNECTION_ESTABLISHED|DAF_CONNECTION_CLOSED)) == DAF_CONNECTION_ESTABLISHED)
589  {
590  man_bytecount_output_server(man, bytes_in_total, bytes_out_total, mdac);
591  }
592 }
593 
594 #endif /* MANAGEMENT_DEF_AUTH */
595 
596 #endif /* ifdef ENABLE_MANAGEMENT */
597 
602 void management_sleep(const int n);
603 
604 #endif /* ifndef MANAGE_H */
void command_line_free(struct command_line *cl)
Definition: manage.c:3765
const char * log_entry_print(const struct log_entry *e, unsigned int flags, struct gc_arena *gc)
Definition: manage.c:3818
const char * string
Definition: manage.h:92
int client_uid
Definition: manage.h:237
void management_pre_tunnel_close(struct management *man)
Definition: manage.c:2974
static int buf_len(const struct buffer *buf)
Definition: buffer.h:240
bool management_over_tunnel
Definition: manage.h:231
int password_tries
Definition: manage.h:273
struct log_history * state
Definition: manage.h:214
void management_sleep(const int n)
A sleep function that services the management layer for n seconds rather than doing nothing...
Definition: manage.c:3995
bool management_query_user_pass(struct management *man, struct user_pass *up, const char *type, const unsigned int flags, const char *static_challenge)
Definition: manage.c:3376
int state
Definition: manage.h:85
static int log_history_size(const struct log_history *h)
Definition: manage.h:139
bool management_would_hold(struct management *man)
Definition: manage.c:3676
struct man_persist persist
Definition: manage.h:320
unsigned int msg_flags
Definition: manage.h:84
void management_echo(struct management *man, const char *string, const bool pull)
Definition: manage.c:2920
const char * up_query_type
Definition: manage.h:307
struct man_connection connection
Definition: manage.h:322
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)
Definition: manage.c:2579
struct management_callback callback
Definition: manage.h:211
int size
Definition: manage.h:123
void command_line_add(struct command_line *cl, const unsigned char *buf, const int len)
Definition: manage.c:3774
struct buffer_list * in_extra
Definition: manage.h:285
#define in_addr_t
Definition: config-msvc.h:104
struct buffer buf
Definition: manage.h:63
struct addrinfo * local
Definition: manage.h:227
counter_type bytes_in
Definition: manage.h:220
int echo_buffer_size
Definition: manage.h:234
#define MCF_SERVER
Definition: manage.h:158
#define MF_QUERY_PROXY
Definition: manage.h:348
int ext_key_state
Definition: manage.h:294
Definition: manage.h:83
in_addr_t local_ip
Definition: manage.h:93
const struct log_entry * log_history_ref(const struct log_history *h, const int index)
Definition: manage.c:3982
void management_socket_set(struct management *man, struct event_set *es, void *arg, unsigned int *persistent)
Definition: manage.c:3018
list flags
#define MF_QUERY_REMOTE
Definition: manage.h:347
void management_up_down(struct management *man, const char *updown, const struct env_set *es)
Definition: manage.c:2802
time_t bytecount_last_update
Definition: manage.h:305
static void management_bytes_out_client(struct management *man, const int size)
Definition: manage.h:542
char * management_query_pk_sig(struct management *man, const char *b64_data)
Definition: manage.c:3642
void command_line_next(struct command_line *cl)
Definition: manage.c:3806
struct buffer_list * ext_key_input
Definition: manage.h:295
char * write_peer_info_file
Definition: manage.h:236
struct command_line * command_line_new(const int buf_len)
Definition: manage.c:3748
int up_query_mode
Definition: manage.h:308
time_t timestamp
Definition: manage.h:91
time_t now
Definition: otime.c:36
bool standalone_disabled
Definition: manage.h:210
void management_auth_token(struct management *man, const char *token)
Definition: manage.c:2996
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_addr, const struct openvpn_sockaddr *remote_addr)
Definition: manage.c:2663
const char * command_line_get(struct command_line *cl)
Definition: manage.c:3790
struct event_set * es
Definition: manage.h:298
static void management_bytes_in(struct management *man, const int size)
Definition: manage.h:565
int in_extra_cmd
Definition: manage.h:284
int capacity
Definition: manage.h:124
void management_notify_generic(struct management *man, const char *str)
Definition: manage.c:2818
struct command_line * in
Definition: manage.h:275
void management_event_loop_n_seconds(struct management *man, int sec)
Definition: manage.c:3324
static SERVICE_STATUS status
Definition: automatic.c:43
static void management_bytes_in_client(struct management *man, const int size)
Definition: manage.h:549
int state_buffer_size
Definition: manage.h:235
void management_set_callback(struct management *man, const struct management_callback *cb)
Definition: manage.c:2646
struct management * management
Definition: manage.c:63
unsigned int counter_type
Definition: common.h:38
void log_history_close(struct log_history *h)
Definition: manage.c:3933
socket_descriptor_t sd_cli
Definition: manage.h:264
bool state_realtime
Definition: manage.h:301
static bool management_connected(const struct management *man)
Definition: manage.h:438
bool hold_release
Definition: manage.h:216
unsigned int mansig
Definition: manage.h:244
bool defined
Definition: manage.h:205
counter_type bytes_out
Definition: manage.h:221
void management_io(struct management *man)
Definition: manage.c:3058
struct log_history * log_history_init(const int capacity)
Definition: manage.c:3912
void management_clear_callback(struct management *man)
Definition: manage.c:2654
static int log_history_capacity(const struct log_history *h)
Definition: manage.h:145
void management_post_tunnel_open(struct management *man, const in_addr_t tun_local_ip)
Definition: manage.c:2951
int base
Definition: manage.h:122
struct log_history * log
Definition: manage.h:207
void log_history_resize(struct log_history *h, const int capacity)
Definition: manage.c:3961
#define MF_QUERY_PASSWORDS
Definition: manage.h:333
const char * special_state_msg
Definition: manage.h:218
struct management * management_init(void)
Definition: manage.c:2563
int log_history_cache
Definition: manage.h:233
void log_history_add(struct log_history *h, const struct log_entry *le)
Definition: manage.c:3940
int client_version
Definition: manage.h:315
int env_filter_level
Definition: manage.h:299
void management_auth_failure(struct management *man, const char *type, const char *reason)
Definition: manage.c:2983
static bool management_query_user_pass_enabled(const struct management *man)
Definition: manage.h:444
int msglevel
Definition: status.h:56
SOCKET socket_descriptor_t
Definition: syshead.h:488
#define msg
Definition: error.h:173
struct log_entry * array
Definition: manage.h:125
Definition: misc.h:62
Wrapper structure for dynamically allocated memory.
Definition: buffer.h:60
struct buffer_list * ext_cert_input
Definition: manage.h:297
static settings_t settings
Definition: interactive.c:57
bool echo_realtime
Definition: manage.h:303
static void man_bytecount_possible_output_client(struct management *man)
Definition: manage.h:531
unsigned int flags
Definition: manage.h:226
socket_descriptor_t sd_top
Definition: manage.h:263
bool management_should_daemonize(struct management *man)
Definition: manage.c:3686
int intval
Definition: manage.h:86
static void management_bytes_out(struct management *man, const int size)
Definition: manage.h:556
Definition: manage.h:89
#define bool
Definition: simple.c:61
unsigned int flags
Definition: manage.h:159
struct buffer_list * out
Definition: manage.h:276
Garbage collection arena used to keep track of dynamically allocated memory.
Definition: buffer.h:116
bool management_hold(struct management *man, int holdtime)
Definition: manage.c:3696
bool defined
Definition: manage.h:225
char * management_query_cert(struct management *man, const char *cert_name)
Definition: manage.c:3657
void management_close(struct management *man)
Definition: manage.c:2636
#define MS_CC_WAIT_WRITE
Definition: manage.h:258
bool log_realtime
Definition: manage.h:302
bool password_verified
Definition: manage.h:272
static bool management_query_remote_enabled(const struct management *man)
Definition: manage.h:450
int bytecount_update_seconds
Definition: manage.h:304
void management_notify(struct management *man, const char *severity, const char *type, const char *text)
Definition: manage.c:2812
#define BOOL_CAST(x)
Definition: basic.h:27
static bool management_query_proxy_enabled(const struct management *man)
Definition: manage.h:456
int client_gid
Definition: manage.h:238
struct man_settings settings
Definition: manage.h:321
void command_line_reset(struct command_line *cl)
Definition: manage.c:3758
#define MS_CC_WAIT_READ
Definition: manage.h:257
struct log_history * echo
Definition: manage.h:213
void man_bytecount_output_client(struct management *man)
Definition: manage.c:472
int ext_cert_state
Definition: manage.h:296