Changeset 140 for trunk/include


Ignore:
Timestamp:
Oct 29, 2007, 1:09:10 AM (17 years ago)
Author:
rainer
Message:

Utility function for threaded modules.

Location:
trunk/include
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/samhain.h

    r138 r140  
    126126  SH_CHECK_INIT    = 1,
    127127  SH_CHECK_CHECK   = 2
     128};
     129
     130enum {
     131  SH_MOD_ACTIVE    = 0,
     132  SH_MOD_THREAD    = 1,
     133  SH_MOD_FAILED    = 2
    128134};
    129135
  • trunk/include/sh_kern.h

    r68 r140  
    66
    77#ifdef SH_USE_KERN
    8 int sh_kern_init  (void);
     8int sh_kern_init  (struct mod_type * arg);
    99int sh_kern_timer (time_t tcurrent);
    1010int sh_kern_check (void);
  • trunk/include/sh_modules.h

    r68 r140  
    33#define SH_MODULE_H
    44
     5#include "sh_pthread.h"
    56
    67typedef struct rconf
     
    1920
    2021  /* The initialization function. Return 0 on success.         */
    21   int (* mod_init)    (void); 
     22  int (* mod_init)    (struct mod_type * arg); 
    2223                             
    2324  /* The timer function. Return 0 if NOT time to check.        */
     
    3940  sh_rconf * conf_table;
    4041
     42  SH_MUTEX(mod_mutex);
     43
    4144} sh_mtype;
    4245
  • trunk/include/sh_mounts.h

    r1 r140  
    1111
    1212#ifdef SH_USE_MOUNTS
    13 int sh_mounts_init  (void);
     13int sh_mounts_init  (struct mod_type * arg);
    1414int sh_mounts_timer (time_t tcurrent);
    1515int sh_mounts_check (void);
  • trunk/include/sh_portcheck.h

    r67 r140  
    33#define SH_PORTCHECK_H
    44
    5 int sh_portchk_init(void);
     5int sh_portchk_init(struct mod_type * arg);
    66int sh_portchk_timer(time_t tcurrent);
    77int sh_portchk_check(void);
  • trunk/include/sh_processcheck.h

    r67 r140  
    33#define SH_PROCESSCHECK_H
    44
    5 int sh_prochk_init(void);
     5int sh_prochk_init(struct mod_type * arg);
    66int sh_prochk_timer(time_t tcurrent);
    77int sh_prochk_check(void);
  • trunk/include/sh_pthread.h

    r139 r140  
    123123#else
    124124
     125#define PTHREAD_MUTEX_INITIALIZER               NULL
    125126#define SH_MUTEX(M)                             void *SH_MUTEX_DUMMY_ ## M
    126127#define SH_MUTEX_INIT(M,I)                      extern void *SH_MUTEX_DUMMY_ ## M
  • trunk/include/sh_suidchk.h

    r119 r140  
    66
    77#ifdef SH_USE_SUIDCHK
    8 int sh_suidchk_init  (void);
     8int sh_suidchk_init  (struct mod_type * arg);
    99int sh_suidchk_timer (time_t tcurrent);
    1010int sh_suidchk_check (void);
  • trunk/include/sh_userfiles.h

    r68 r140  
    99
    1010#ifdef SH_USE_USERFILES
    11 int sh_userfiles_init  (void);
     11int sh_userfiles_init  (struct mod_type * arg);
    1212int sh_userfiles_timer (time_t tcurrent);
    1313int sh_userfiles_check (void);
  • trunk/include/sh_utmp.h

    r68 r140  
    66
    77#ifdef SH_USE_UTMP
    8 int sh_utmp_init  (void);
     8int sh_utmp_init  (struct mod_type * arg);
    99int sh_utmp_timer (time_t tcurrent);
    1010int sh_utmp_check (void);
Note: See TracChangeset for help on using the changeset viewer.