emu_env_linux.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef HAVE_EMU_ENV_LINUX_H
00029 #define HAVE_EMU_ENV_LINUX_H
00030
00031 #include <stdlib.h>
00032 #include <string.h>
00033 #include <errno.h>
00034
00035 #include "emu/emu.h"
00036 #include "emu/emu_cpu.h"
00037 #include "emu/emu_cpu_data.h"
00038 #include "emu/emu_memory.h"
00039 #include "emu/emu_hashtable.h"
00040
00041 struct emu_profile;
00042 struct emu_env;
00043
00044 struct emu_env_linux
00045 {
00046 struct emu *emu;
00047 struct emu_hashtable *syscall_hooks_by_name;
00048 struct emu_env_linux_syscall *syscall_hookx;
00049 struct emu_env_hook *hooks;
00050
00051 };
00052
00053 struct emu_env_linux *emu_env_linux_new(struct emu *e);
00054 void emu_env_linux_free(struct emu_env_linux *eel);
00055
00056 struct emu_env_hook *emu_env_linux_syscall_check(struct emu_env *env);
00057
00058
00059 struct emu_env_linux_syscall_entry
00060 {
00061 const char *name;
00062 const char *(*fnhook)(struct emu_env_linux *env);
00063 };
00064
00065
00066 typedef uint32_t (*userhook)(struct emu_env_linux *env, struct emu_env_linux_syscall *syscall, ...);
00067
00068 struct emu_env_linux_syscall
00069 {
00070 const char *name;
00071 int32_t (*fnhook)(struct emu_env *env, struct emu_env_hook *hook);
00072 void *userdata;
00073 uint32_t (*userhook)(struct emu_env *env, struct emu_env_hook *hook, ...);
00074 };
00075
00076 int32_t emu_env_linux_syscall_hook(struct emu_env *env, const char *syscallname,
00077 uint32_t (*userhook)(struct emu_env *env, struct emu_env_hook *hook, ...),
00078 void *userdata);
00079
00080 const char *env_linux_socketcall(struct emu_env_linux *env);
00081
00082 #endif