Blame include/db.h

Packit 762fc5
/* aide, Advanced Intrusion Detection Environment
Packit 762fc5
 *
Packit 762fc5
 * Copyright (C) 1999-2002,2004,2005,2013,2016 Rami Lehti, Pablo Virolainen,
Packit 762fc5
 * Richard van den Berg, Hannes von Haugwitz
Packit 762fc5
 * $Header$
Packit 762fc5
 *
Packit 762fc5
 * This program is free software; you can redistribute it and/or
Packit 762fc5
 * modify it under the terms of the GNU General Public License as
Packit 762fc5
 * published by the Free Software Foundation; either version 2 of the
Packit 762fc5
 * License, or (at your option) any later version.
Packit 762fc5
 *
Packit 762fc5
 * This program is distributed in the hope that it will be useful, but
Packit 762fc5
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 762fc5
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Packit 762fc5
 * General Public License for more details.
Packit 762fc5
 *
Packit 762fc5
 * You should have received a copy of the GNU General Public License
Packit 762fc5
 * along with this program; if not, write to the Free Software
Packit 762fc5
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Packit 762fc5
 */
Packit 762fc5
Packit 762fc5
#ifndef _DB_H_INCLUDED
Packit 762fc5
#define _DB_H_INCLUDED
Packit 762fc5
Packit 762fc5
#include <stdio.h>
Packit 762fc5
#include "db_config.h"
Packit 762fc5
Packit 762fc5
int db_init(int);
Packit 762fc5
Packit 762fc5
db_line* db_readline(int);
Packit 762fc5
Packit 762fc5
int db_writespec(db_config*);
Packit 762fc5
Packit 762fc5
int db_writeline(db_line*,db_config*);
Packit 762fc5
Packit 762fc5
void db_close();
Packit 762fc5
Packit 762fc5
void free_db_line(db_line* dl);
Packit 762fc5
Packit 762fc5
extern const char* db_names[];
Packit 762fc5
extern const int db_value[];
Packit 762fc5
Packit 762fc5
#define DB_OLD            (1<<0)
Packit 762fc5
#define DB_WRITE          (1<<1)
Packit 762fc5
#define DB_NEW            (1<<2)
Packit 762fc5
#define NODE_ADDED        (1<<4)
Packit 762fc5
#define NODE_REMOVED      (1<<5)
Packit 762fc5
#define NODE_CHANGED      (1<<6)
Packit 762fc5
#define NODE_FREE         (1<<7)
Packit 762fc5
#define DB_DISK           (1<<8)
Packit 762fc5
Packit 762fc5
#define NODE_TRAVERSE     (1<<9)
Packit 762fc5
#define NODE_CHECKED      (1<<10)
Packit 762fc5
#define NODE_MOVED_OUT    (1<<11)
Packit 762fc5
#define NODE_MOVED_IN     (1<<12)
Packit 762fc5
#define NODE_ALLOW_NEW    (1<<13)
Packit 762fc5
#define NODE_ALLOW_RM	  (1<<14)
Packit 762fc5
Packit 762fc5
#endif