From e32551b18f4560056d2d482f5e1505b1b98fa82a Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 29 Mar 2005 18:07:58 +0000 Subject: *** empty log message *** --- runtime/docs/html/shellsnoop_2dtr_8c-source.html | 40 +++++++++++------------- 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'runtime/docs/html/shellsnoop_2dtr_8c-source.html') diff --git a/runtime/docs/html/shellsnoop_2dtr_8c-source.html b/runtime/docs/html/shellsnoop_2dtr_8c-source.html index 64f58859..7391b8ce 100644 --- a/runtime/docs/html/shellsnoop_2dtr_8c-source.html +++ b/runtime/docs/html/shellsnoop_2dtr_8c-source.html @@ -4,14 +4,14 @@ -
Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages
+
Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

dtr.c

00001 #define HASH_TABLE_BITS 8
 00002 #define HASH_TABLE_SIZE (1<<HASH_TABLE_BITS)
 00003 #define BUCKETS 16 /* largest histogram width */
 00004 
-00005 #include "runtime.h"
+00005 #include "runtime.h"
 00006 #include "io.c"
 00007 #include "map.c"
 00008 #include "copy.c"
@@ -32,14 +32,14 @@
 00023   if (!strcmp(current->comm,"bash") || !strcmp(current->comm,"sh") || !strcmp(current->comm, "zsh")
 00024       || !strcmp(current->comm, "tcsh") || !strcmp(current->comm, "pdksh"))
 00025     {
-00026       dlog ("%d\t%d\t%d\t%s ", current->uid, current->pid, current->parent->pid, filename);
+00026       dlog ("%d\t%d\t%d\t%s ", current->uid, current->pid, current->parent->pid, filename);
 00027 
-00028       _stp_map_key_long (pids, current->pid);
-00029       _stp_map_set_int64 (pids, 1);
+00028       _stp_map_key_long (pids, current->pid);
+00029       _stp_map_set_int64 (pids, 1);
 00030       
-00031       _stp_list_clear (arglist);
-00032       _stp_copy_argv_from_user (arglist, argv);
-00033       foreach (arglist, ptr)
+00031       _stp_list_clear (arglist);
+00032       _stp_copy_argv_from_user (arglist, argv);
+00033       foreach (arglist, ptr)
 00034         printk ("%s ", ptr->str);
 00035       printk ("\n");
 00036     }
@@ -49,9 +49,9 @@
 00040 
 00041 struct file * inst_filp_open (const char * filename, int flags, int mode)
 00042 {
-00043   _stp_map_key_long (pids, current->pid);
+00043   _stp_map_key_long (pids, current->pid);
 00044   if (_stp_map_get_int64 (pids))
-00045     dlog ("%d\t%d\t%s\tO %s\n", current->pid, current->parent->pid, current->comm, filename);
+00045     dlog ("%d\t%d\t%s\tO %s\n", current->pid, current->parent->pid, current->comm, filename);
 00046   
 00047   jprobe_return();
 00048   return 0;
@@ -59,9 +59,9 @@
 00050 
 00051 asmlinkage ssize_t inst_sys_read (unsigned int fd, char __user * buf, size_t count)
 00052 {
-00053   _stp_map_key_long (pids, current->pid);
+00053   _stp_map_key_long (pids, current->pid);
 00054   if (_stp_map_get_int64 (pids))
-00055     dlog ("%d\t%d\t%s\tR %d\n", current->pid, current->parent->pid, current->comm, fd);
+00055     dlog ("%d\t%d\t%s\tR %d\n", current->pid, current->parent->pid, current->comm, fd);
 00056   
 00057   jprobe_return();
 00058   return 0;
@@ -71,7 +71,7 @@
 00062 {
 00063   size_t len;
 00064   char str[256];
-00065   _stp_map_key_long (pids, current->pid);
+00065   _stp_map_key_long (pids, current->pid);
 00066   if (_stp_map_get_int64 (pids))
 00067     {
 00068       if (count < 64) 
@@ -113,26 +113,24 @@
 00104 {
 00105   int ret;
 00106 
-00107   pids = _stp_map_new (10000, INT64);
-00108   arglist = _stp_list_new (10, STRING);
+00107   pids = _stp_map_new (10000, INT64);
+00108   arglist = _stp_list_new (10, STRING);
 00109 
 00110   ret = _stp_register_jprobes (dtr_probes, MAX_DTR_ROUTINE);
 00111 
-00112   dlog("instrumentation is enabled...\n");
+00112   dlog("instrumentation is enabled...\n");
 00113   return ret;
 00114 }
 00115 
 00116 static void cleanup_dtr(void)
 00117 {
 00118   _stp_unregister_jprobes (dtr_probes, MAX_DTR_ROUTINE);
-00119   _stp_map_del (pids);
-00120   dlog("EXIT\n");
+00119   _stp_map_del (pids);
+00120   dlog("EXIT\n");
 00121 }
 00122 
 00123 module_init(init_dtr);
 00124 module_exit(cleanup_dtr);
 00125 MODULE_LICENSE("GPL");
 00126 
-

-Generated on Tue Mar 22 10:27:36 2005 for SystemTap. - + -- cgit