e3aaff8e |
/* |
086eab5c |
* Copyright (C) 2007-2009 Sourcefire, Inc.
*
* Authors: Tomasz Kojm, Török Edvin |
e3aaff8e |
*
* This program is free software; you can redistribute it and/or modify |
bb34cb31 |
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. |
e3aaff8e |
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software |
48b7b4a7 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA. |
e3aaff8e |
*/
#ifndef __SCANNER_H
#define __SCANNER_H
|
a617b5ea |
#define TYPE_SCAN 0
#define TYPE_CONTSCAN 1
#define TYPE_MULTISCAN 2
|
2086dc5c |
#include <sys/types.h>
|
bd8603aa |
#include "libclamav/clamav.h" |
064b4a0c |
#include "shared/optparser.h" |
949c6fe5 |
#include "thrmgr.h"
#include "session.h" |
e3aaff8e |
|
949c6fe5 |
struct scan_cb_data {
int scantype;
int odesc;
int type;
int infected;
int errors;
int total;
int id;
const client_conn_t *conn;
const char *toplevel_path;
unsigned long scanned;
unsigned int options;
struct cl_engine *engine;
const struct optstruct *opts;
threadpool_t *thr_pool;
jobgroup_t *group; |
2086dc5c |
dev_t dev; |
949c6fe5 |
}; |
e3aaff8e |
|
949c6fe5 |
int scanfd(const int fd, const client_conn_t *conn, unsigned long int *scanned, const struct cl_engine *engine, unsigned int options, const struct optstruct *opts, int odesc, int stream);
int scanstream(int odesc, unsigned long int *scanned, const struct cl_engine *engine, unsigned int options, const struct optstruct *opts, char term);
int scan_callback(struct stat *sb, char *filename, const char *msg, enum cli_ftw_reason reason, struct cli_ftw_cbdata *data); |
51bbedb1 |
int scan_pathchk(const char *path, struct cli_ftw_cbdata *data); |
e3aaff8e |
#endif |