1 /* 2 * AIDE (Advanced Intrusion Detection Environment) 3 * 4 * Copyright (C) 1999-2002, 2006, 2020 Rami Lehti, Pablo Virolainen, 5 * Richard van den Berg, Hannes von Haugwitz 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as 9 * published by the Free Software Foundation; either version 2 of the 10 * License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License along 18 * with this program; if not, write to the Free Software Foundation, Inc., 19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 */ 21 22 #ifndef _DB_LEX_H_INCLUDED_ 23 #define _DB_LEX_H_INCLUDED_ 24 25 #include "url.h" 26 #include <stdio.h> 27 #include "db_config.h" 28 29 extern char* dbtext; 30 31 void db_lex_buffer(database*); 32 void db_lex_delete_buffer(database*); 33 int db_scan(void); 34 35 typedef enum { 36 TBEGIN_DB = 1, 37 TEND_DB, 38 TSTRING, 39 TPATH, 40 TDBSPEC, 41 TUNKNOWN, 42 TNEWLINE, 43 TEOF, 44 } DB_TOKEN; 45 46 #define LOG_DB_FORMAT_LINE(log_level, format, ...) \ 47 log_msg(log_level, "%s:%s:%li: " #format , get_url_type_string((db->url)->type), (db->url)->value, db->lineno, __VA_ARGS__); 48 49 #endif 50