clamav/clamav-devel/libclamav/filetypes.h

64 lines
1.8 KiB
C
Raw Normal View History

/*
2005-02-05 15:50:18 +00:00
* Copyright (C) 2002 - 2005 Tomasz Kojm <tkojm@clamav.net>
* With enhancements from Thomas Lamy <Thomas.Lamy@in-online.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __FILETYPES_H
#define __FILETYPES_H
#define MAGIC_BUFFER_SIZE 50
#define CL_TYPENO 500
typedef enum {
2004-09-13 16:44:01 +00:00
CL_TYPE_UNKNOWN_TEXT = CL_TYPENO,
CL_TYPE_UNKNOWN_DATA,
CL_TYPE_MSEXE,
2005-08-29 15:02:38 +00:00
CL_TYPE_ELF,
2004-09-13 16:44:01 +00:00
CL_TYPE_DATA,
CL_TYPE_POSIX_TAR,
CL_TYPE_OLD_TAR,
2004-09-13 16:44:01 +00:00
CL_TYPE_GZ,
CL_TYPE_ZIP,
CL_TYPE_BZ,
CL_TYPE_RAR,
CL_TYPE_MSSZDD,
CL_TYPE_MSOLE2,
CL_TYPE_MSCAB,
CL_TYPE_MSCHM,
CL_TYPE_SIS,
2004-09-13 16:44:01 +00:00
CL_TYPE_SCRENC,
CL_TYPE_GRAPHICS,
2005-02-05 15:50:18 +00:00
CL_TYPE_RIFF,
CL_TYPE_BINHEX,
CL_TYPE_TNEF,
CL_TYPE_CRYPTFF,
2005-05-01 00:47:39 +00:00
CL_TYPE_PDF,
/* bigger numbers have higher priority (in o-t-f detection) */
2004-09-13 16:44:01 +00:00
CL_TYPE_HTML, /* on the fly */
CL_TYPE_MAIL, /* magic + on the fly */
CL_TYPE_ZIPSFX, /* on the fly */
CL_TYPE_RARSFX /* on the fly */
} cli_file_t;
cli_file_t cli_filetype(const char *buf, size_t buflen);
cli_file_t cli_filetype2(int desc);
int cli_addtypesigs(struct cl_engine *engine);
#endif