Advertisement
Guest User

mod_proc.h

a guest
Feb 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.67 KB | None | 0 0
  1. #include <linux/kernel.h>
  2. #include <linux/module.h>
  3. #include <linux/proc_fs.h>
  4. //#include <asm/uaccess.h>
  5. #include <linux/uaccess.h>
  6. #include <linux/fs_struct.h>
  7. #include <linux/slab.h>
  8. #include <linux/sched.h>
  9. #include <linux/fdtable.h>
  10. #include <linux/vmalloc.h>
  11.  
  12. #define PROCFS_TREE_NAME "mod_proc_tree"
  13. #define PROCFS_MEM_NAME "mod_proc_mem"
  14. #define PROCFS_FILES_NAME "mod_proc_files"
  15. #define MAX_WRITE_BUF_SIZE 10
  16. #define DEPTH 1000
  17.  
  18. bool is_number(const char *str, int n);
  19. int str_to_number(const char *str, int n);
  20. void mem_info(int id, char* buf);
  21. void files_info(int id, char* buf);
  22. void process_info(struct task_struct* task, int n, char* buf, int* offset);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement