const char *cmd_name);
int client_connection_init(struct client_connection *conn,
- enum client_connection_type type, pool_t pool, int fd);
+ enum doveadm_client_connection_type type, pool_t pool, int fd);
void client_connection_destroy(struct client_connection **_conn);
void client_connection_set_proctitle(struct client_connection *conn,
}
int client_connection_init(struct client_connection *conn,
- enum client_connection_type type, pool_t pool, int fd)
+ enum doveadm_client_connection_type type, pool_t pool, int fd)
{
const char *ip;
#define DOVEADM_LOG_CHANNEL_ID 'L'
-enum client_connection_type {
- CLIENT_CONNECTION_TYPE_CLI = 0,
- CLIENT_CONNECTION_TYPE_TCP,
- CLIENT_CONNECTION_TYPE_HTTP,
-};
-
struct client_connection {
pool_t pool;
- enum client_connection_type type;
+ enum doveadm_client_connection_type type;
const char *name;
struct ip_addr local_ip, remote_ip;
#define DOVEADM_CMD_H
#include "net.h"
-#include "client-connection.h"
#define DOVEADM_CMD_PARAMS_START .parameters = (const struct doveadm_cmd_param[]){
#define DOVEADM_CMD_PARAM(optP, nameP, typeP, flagP ) { .short_opt = optP, .name = nameP, .type = typeP, .flags = flagP },
struct ip_addr local_ip, remote_ip;
in_port_t local_port, remote_port;
- enum client_connection_type conn_type;
+ enum doveadm_client_connection_type conn_type;
struct istream *input;
struct ostream *output;
};
struct kick_context {
struct who_context who;
HASH_TABLE(void *, struct kick_pid *) pids;
- enum client_connection_type conn_type;
+ enum doveadm_client_connection_type conn_type;
bool force_kick;
ARRAY(const char *) kicked_users;
};
#include <sysexits.h>
#include "doveadm-util.h"
-#include "doveadm-cmd.h"
#include "doveadm-settings.h"
#define USAGE_CMDNAME_FMT " %-12s"
#define DOVEADM_EX_NOTPOSSIBLE EX_DATAERR
#define DOVEADM_EX_UNKNOWN -1
+enum doveadm_client_connection_type {
+ CLIENT_CONNECTION_TYPE_CLI = 0,
+ CLIENT_CONNECTION_TYPE_TCP,
+ CLIENT_CONNECTION_TYPE_HTTP,
+};
+
+#include "doveadm-cmd.h"
+
extern bool doveadm_verbose_proctitle;
extern int doveadm_exit_code;