X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=blobdiff_plain;f=src%2Fsyscheckd%2Fsyscheck.h;h=78cc1c3565e782d004ffd0be0da9a8ba164d4936;hb=HEAD;hp=53f5989de8657764825c5f509b4d1755d9300288;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/syscheckd/syscheck.h b/src/syscheckd/syscheck.h old mode 100755 new mode 100644 index 53f5989..78cc1c3 --- a/src/syscheckd/syscheck.h +++ b/src/syscheckd/syscheck.h @@ -1,17 +1,13 @@ -/* @(#) $Id: syscheck.h,v 1.16 2009/06/30 17:08:19 dcid Exp $ */ - /* Copyright (C) 2009 Trend Micro Inc. * All right reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation */ - #ifndef __SYSCHECK_H - #define __SYSCHECK_H #include "config/syscheck-config.h" @@ -20,57 +16,50 @@ /* Notify list size */ #define NOTIFY_LIST_SIZE 32 - /* Global config */ -config syscheck; - +extern syscheck_config syscheck; /** Function Prototypes **/ -/* run_check: checks the integrity of the files against the - * saved database - */ -void run_check(); +/* Check the integrity of the files against the saved database */ +void run_check(void); +/* Run run_check periodically */ +void start_daemon(void) __attribute__((noreturn)); -/* start_daemon: Runs run_check periodically. - */ -void start_daemon(); +/* Read the XML config */ +int Read_Syscheck_Config(const char *cfgfile) __attribute__((nonnull)); +/* Create the database */ +int create_db(void); -/* Read the XML config */ -int Read_Syscheck_Config(char * cfgfile); +/* Check database for changes */ +int run_dbcheck(void); +/* Scan directory */ +int read_dir(const char *dir_name, int opts, OSMatch *restriction); -/* create the database */ -int create_db(); +/* Check the registry for changes */ +void os_winreg_check(void); -/* int check_db() - * Checks database for new files. - */ -int check_db(); - -/** void os_winreg_check() - * Checks the registry for changes. - */ -void os_winreg_check(); +/* Start real time */ +int realtime_start(void); -/* starts real time */ -int realtime_start(); +/* Add a directory to real time monitoring */ +int realtime_adddir(const char *dir) __attribute__((nonnull)); -/* Adds a directory to real time monitoring. */ -int realtime_adddir(char *dir); +/* Process real time queue */ +int realtime_process(void); -/* Process real time queue. */ -int realtime_process(); +/* Process the content of the file changes */ +char *seechanges_addfile(const char *filename) __attribute__((nonnull)); -/** Sends syscheck message. - */ -int send_syscheck_msg(char *msg); -int send_rootcheck_msg(char *msg); +/* Get checksum changes */ +int c_read_file(const char *file_name, const char *oldsum, char *newsum) __attribute__((nonnull)); +int send_syscheck_msg(const char *msg) __attribute__((nonnull)); +int send_rootcheck_msg(const char *msg) __attribute__((nonnull)); #endif -/* EOF */