|
tracedump
single application IP packet sniffer
|
#include <stdbool.h>#include <stdint.h>#include <sys/socket.h>#include <linux/net.h>#include <netinet/in.h>#include <stdarg.h>#include "tracedump.h"Go to the source code of this file.
Functions | |
| int32_t | inject_socketcall (struct tracedump *td, struct pid *sp, uint32_t sc_code,...) |
| Inject socketcall() into running process. | |
| void | inject_escape_socketcall (struct tracedump *td, struct pid *sp) |
| Circumvent an on-going socketcall. | |
| void | inject_restore_socketcall (struct tracedump *td, struct pid *sp) |
| Cancel inject_escape_socketcall() effects. | |
Circumvent an on-going socketcall.
Implemented by calling socketcall with an invalid subcode, which will result in an -EINVAL. This will put the traced process in normal state, ie. executing the code under EIP, which is required for the inject_*() functions to work properly.
Definition at line 133 of file inject.c.
Referenced by handle_socket().
Cancel inject_escape_socketcall() effects.
This function will execute the whole socketcall until it finishes
Definition at line 151 of file inject.c.
Referenced by handle_socket().
Inject socketcall() into running process.
Supports variable list of arguments to socketcall(), each may be of different kind
| td | tracedump root |
| pid | process id |
| sc_code | socketcall subcode (see include/linux/net.h) |
| varg1 | enum arg_type |
| varg2 | uint32_t: memory size or a value |
| varg3 | OPTIONAL void *: address of the memory |
| ... | |
| 1,0,1 |
Definition at line 16 of file inject.c.
Referenced by inject_autobind(), inject_getsockname_in(), and inject_getsockopt().
1.7.3