doveadm-who.c revision bde78a7bf5f9000f1ae4dc7ce6cabd012e1f8b79
/* Copyright (c) 2009-2010 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "network.h"
#include "istream.h"
#include "wildcard-match.h"
#include "hash.h"
#include "str.h"
#include "doveadm.h"
#include "doveadm-print.h"
#include "doveadm-who.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
struct who_user {
const char *username;
const char *service;
unsigned int connection_count;
};
static unsigned int who_user_hash(const void *p)
{
}
{
return 1;
return 1;
return 0;
}
static bool
{
return TRUE;
}
return FALSE;
}
{
const char *ident = args[0];
const char *p, *ip_str;
p = strchr(ident, '/');
}
{
return TRUE;
}
return FALSE;
}
{
}
}
{
unsigned int net_bits;
usage();
} else {
usage();
}
args++;
}
}
{
#define ANVIL_HANDSHAKE "VERSION\tanvil\t1\t0\n"
const char *line;
int fd;
if (*line == '\0')
break;
T_BEGIN {
} T_END;
}
if (input->stream_errno != 0)
}
const struct who_filter *filter)
{
return FALSE;
}
break;
}
}
if (!ret)
return FALSE;
}
return TRUE;
}
{
str_truncate(str, 0);
}
{
struct hash_iterate_context *iter;
} T_END;
}
}
const struct who_filter *filter)
{
return FALSE;
}
return FALSE;
}
return TRUE;
}
{
unsigned int i;
return;
} T_END;
}
{
struct who_context ctx;
bool separate_connections = FALSE;
int c;
switch (c) {
case '1':
break;
case 'a':
break;
default:
}
}
if (!separate_connections) {
} else {
doveadm_print_header_simple("username");
doveadm_print_header_simple("pid");
doveadm_print_header_simple("ip");
}
}
struct doveadm_cmd doveadm_cmd_who = {
cmd_who, "who",
};