Index: trunk/include/samhain.h
===================================================================
--- trunk/include/samhain.h	(revision 372)
+++ trunk/include/samhain.h	(revision 373)
@@ -205,4 +205,5 @@
 #define SH_INOTIFY_DOSCAN   (1<<1)
 #define SH_INOTIFY_NEEDINIT (1<<2)
+#define SH_INOTIFY_INSCAN   (1<<3)
 
 
Index: trunk/include/sh_files.h
===================================================================
--- trunk/include/sh_files.h	(revision 372)
+++ trunk/include/sh_files.h	(revision 373)
@@ -21,5 +21,5 @@
 #define SH_FILES_H
 
-void sh_audit_mark (char * file);
+void sh_audit_mark (const char * file);
 void sh_audit_delete_all ();
 char * sh_audit_fetch (char * file, time_t time, char * result, size_t rsize);
@@ -226,12 +226,20 @@
 
 ShFileType sh_files_filecheck (int class, unsigned long check_mask,
-			       char * dirName, 
-			       char * infileName,
+			       const char * dirName, 
+			       const char * infileName,
 			       int * reported, 
 			       int rsrcflag);
 
-int sh_files_search_file(char * name, int * class, unsigned long *check_mask, int * reported);
-void sh_files_set_file_reported(char * name);
-void sh_files_clear_file_reported(char * name);
+int sh_files_checkdir (int iclass, unsigned long check_mask, 
+		       int idepth, char * iname, 
+		       char * relativeName);
+
+int sh_files_search_file(char * name, int * class, 
+			 unsigned long *check_mask, int * reported);
+int sh_files_search_dir(char * name, int * class, 
+			unsigned long *check_mask, int *reported,
+			int * rdepth);
+void sh_files_set_file_reported(const char * name);
+void sh_files_clear_file_reported(const char * name);
 
 #endif
Index: trunk/include/sh_inotify.h
===================================================================
--- trunk/include/sh_inotify.h	(revision 372)
+++ trunk/include/sh_inotify.h	(revision 373)
@@ -32,10 +32,13 @@
 
 int sh_inotify_add_watch(char * filename, sh_watches * watches, int  * errnum,
-			 int class, unsigned long check_mask, int type);
+			 int class, unsigned long check_mask, int type, int rdepth);
 
-int sh_inotify_add_watch_later(char * filename, sh_watches * watches, int  * errnum,
-			       int class, unsigned long check_mask, int type);
+int sh_inotify_add_watch_later(const char * filename, sh_watches * watches, 
+			       int  * errnum,
+			       int class, unsigned long check_mask, 
+			       int type, int rdepth);
 
-char * sh_inotify_pop_dormant(sh_watches * watches, int * class, unsigned long * check_mask, int * type);
+char * sh_inotify_pop_dormant(sh_watches * watches, int * class, 
+			      unsigned long * check_mask, int * type, int * rdepth);
 
 void sh_inotify_purge_dormant(sh_watches * watches);
@@ -44,5 +47,6 @@
 
 char * sh_inotify_search_item(sh_watches * watches, int watch, 
-			      int * class, unsigned long * check_mask, int * type);
+			      int * class, unsigned long * check_mask, 
+			      int * type, int * rdepth);
 ssize_t sh_inotify_read(char * buffer, size_t count);
 ssize_t sh_inotify_read_timeout(char * buffer, size_t count, int timeout);
Index: trunk/include/sh_unix.h
===================================================================
--- trunk/include/sh_unix.h	(revision 372)
+++ trunk/include/sh_unix.h	(revision 373)
@@ -307,5 +307,5 @@
 /* obtain file info
  */
-int sh_unix_getinfo (int level, char * filename, file_type * theFile, 
+int sh_unix_getinfo (int level, const char * filename, file_type * theFile, 
 		     char * fileHash, int flagrel);
 
Index: trunk/include/sh_utils.h
===================================================================
--- trunk/include/sh_utils.h	(revision 372)
+++ trunk/include/sh_utils.h	(revision 373)
@@ -187,5 +187,5 @@
 /* check for obscure filenames
  */
-int sh_util_obscurename (ShErrLevel level, char * name, int flag);
+int sh_util_obscurename (ShErrLevel level, const char * name, int flag);
 
 /* returns freshly allocated memory, return value should be free'd
