tracedump
single application IP packet sniffer
|
00001 /* 00002 * Copyright (C) 2011-2012 IITiS PAN Gliwice <http://www.iitis.pl/> 00003 * Author: Paweł Foremski <pjf@iitis.pl> 00004 * Licensed under GNU GPL v. 3 00005 */ 00006 00007 #ifndef _PTRACE_H_ 00008 #define _PTRACE_H_ 00009 00010 #include <stdlib.h> 00011 #include <stdint.h> 00012 #include <sys/ptrace.h> 00013 00016 void ptrace_attach_pid(struct pid *sp, void (*cb)(struct pid *sp)); 00017 00022 int ptrace_attach_child(struct pid *sp, void (*cb)(struct pid *sp)); 00023 00025 void ptrace_traceme(void); 00026 00031 int ptrace_wait(struct pid *sp, int *status); 00032 00034 void ptrace_cont(struct pid *sp, unsigned long sig, bool w8); 00035 00037 void ptrace_cont_syscall(struct pid *sp, unsigned long sig, bool wait); 00038 00040 void ptrace_detach(struct pid *sp, unsigned long sig); 00041 00043 void ptrace_kill(struct pid *sp); 00044 00047 void ptrace_read(struct pid *sp, unsigned long addr, void *vptr, int len); 00048 00051 void ptrace_write(struct pid *sp, unsigned long addr, void *vptr, int len); 00052 00054 void ptrace_getregs(struct pid *sp, struct user_regs_struct *regs); 00055 00057 void ptrace_setregs(struct pid *sp, struct user_regs_struct *regs); 00058 00059 #endif