~ubuntu-branches/debian/sid/clamav/sid

« back to all changes in this revision

Viewing changes to clamdtop/clamdtop.c

  • Committer: Package Import Robot
  • Author(s): Andreas Cadhalpun, Andreas Cadhalpun, Sebastian Andrzej Siewior, Frans Spiesschaert
  • Date: 2014-10-15 06:50:20 UTC
  • mfrom: (1.3.13) (42.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20141015065020-0cpy1hdueggaw35s
Tags: 0.98.5~rc1+dfsg-1
[ Andreas Cadhalpun ]
* Import new upstream release candidate.
* Drop patches included upstream and update the others.
* Add 4 new symbols to libclamav6.symbols.
* Fix debian/copyright.
* Update lintian overrides.
* Update Standards-Version to 3.9.6 (no changes needed).
* Add Breaks and Replaces for old clamd package to clamdscan.
* Remove unnecessary shlibs:Depends from clamav-dbg.
* Add patches to support LLVM 3.5.

[ Sebastian Andrzej Siewior ]
* Add embedded copy of libmspack to be used as fallback, when libmspack-dev
  is not available.

[ Frans Spiesschaert ]
* Updated Dutch Debconf template translation (Closes: #763634)

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
#include <assert.h>
58
58
#include <errno.h>
59
59
 
 
60
#include "libclamav/clamav.h"
60
61
#include "shared/optparser.h"
61
62
#include "shared/misc.h"
62
63
 
101
102
static int send_string_noreconn(conn_t *conn, const char *cmd);
102
103
static void send_string(conn_t *conn, const char *cmd);
103
104
static int read_version(conn_t *conn);
 
105
char *get_ip(const char *ip);
 
106
char *get_port(const char *ip);
 
107
char *make_ip(const char *host, const char *port);
104
108
 
105
109
enum exit_reason {
106
110
        FAIL_CMDLINE=1,
509
513
 
510
514
char *get_ip(const char *ip)
511
515
{
512
 
    char *dupip, *p1, *p2;
 
516
    char *dupip, *p1;
513
517
    unsigned int i;
514
518
 
515
519
    /*
608
612
    int s;
609
613
    struct timeval tv;
610
614
    char *port=NULL;
611
 
    char *name, *pt = strdup(soname);
 
615
    char *pt = strdup(soname);
612
616
    const char *host = pt;
613
617
    struct addrinfo hints, *res=NULL, *p;
614
618
    int err;
1217
1221
 
1218
1222
static void sigint(int a)
1219
1223
{
 
1224
    UNUSEDPARAM(a);
1220
1225
        EXIT_PROGRAM(SIGINT_REASON);
1221
1226
}
1222
1227
 
1224
1229
{
1225
1230
    printf("\n");
1226
1231
    printf("           Clam AntiVirus: Monitoring Tool %s\n", get_version());
1227
 
    printf("           By The ClamAV Team: http://www.clamav.net/team\n");
 
1232
    printf("           By The ClamAV Team: http://www.clamav.net/about.html#credits\n");
1228
1233
    printf("           (C) 2008-2009 Sourcefire, Inc.\n\n");
1229
1234
    printf("clamdtop [-hVc] [host[:port] /path/to/clamd.socket ...]\n\n");
1230
1235
    printf("    --help                 -h         Show help\n");