1 /* 2 * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. 3 * Copyright (C) 2007-2013 Sourcefire, Inc. 4 * 5 * Authors: Tomasz Kojm 6 * 7 * Summary: Code to parse Clamav CVD database format. 8 * 9 * Acknowledgements: ClamAV untar code is based on a public domain minitar utility 10 * by Charles G. Waldman. 11 * 12 * This program is free software; you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License version 2 as 14 * published by the Free Software Foundation. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this program; if not, write to the Free Software 23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 24 * MA 02110-1301, USA. 25 */ 26 27 #ifndef __CVD_H 28 #define __CVD_H 29 30 #include <stdio.h> 31 #include <zlib.h> 32 #include "clamav.h" 33 34 struct cli_dbio { 35 gzFile gzs; 36 FILE *fs; 37 unsigned int size, bread; 38 char *buf, *bufpt, *readpt; 39 unsigned int usebuf, bufsize, readsize; 40 unsigned int chkonly; 41 void *hashctx; 42 }; 43 44 int cli_cvdload(FILE *fs, struct cl_engine *engine, unsigned int *signo, unsigned int options, unsigned int dbtype, const char *filename, unsigned int chkonly); 45 int cli_cvdunpack(const char *file, const char *dir); 46 47 #endif 48